mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #1037] tests: GPU fixtures for the packed 16-bit integer ops #1074
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1074
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1037
Author: @YaBulochka
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:feat/fixtures-batch3📝 Commits (1)
45a3728tests: GPU fixtures for the packed 16-bit integer ops📊 Changes
9 files changed (+270 additions, -3 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
docs/shader_validation.md(+2 -0)📝
runtime/test/shaders/check.py(+5 -1)➕
runtime/test/shaders/cs_pk_int16_i.asm(+49 -0)➕
runtime/test/shaders/cs_pk_int16_u.asm(+46 -0)📝
scripts/run_gpu_tests.py(+5 -1)➕
tests/semantic/fixtures/disasm/cs_pk_int16_i.s(+25 -0)➕
tests/semantic/fixtures/disasm/cs_pk_int16_u.s(+23 -0)➕
tests/semantic/test_pk_int16_gpu_fixtures.py(+114 -0)📄 Description
Claimed in the coordination issue as: carried over from the closed original repository (branch
feat/fixtures-batch3); no new claimDepends on: none. Overlaps #366 (
v_pk_add_u16/v_pk_mad_i16) and #171/#853 (cs_w32_pk_rel_ext); this PR covers all eleven integer forms in two fixtures with the fullop_sel/op_sel_hi/clampgrid and CPU fixtures, so the overlapping rows can be dropped from whichever lands second.What and why
Two wave32 GPU fixtures for the packed 16-bit integer ops in
docs/design.md:cs_pk_int16_u: the six u16 forms (v_pk_add/sub_u16,v_pk_mul_lo_u16,v_pk_mad_u16,v_pk_max/min_u16) withop_sel/op_sel_hiandclampon add and sub;cs_pk_int16_i: the five i16 forms withop_sel/op_sel_hiandclampon add, sub and mad.Each header derives its eight words. Both are registered in
check.pyandscripts/run_gpu_tests.py;tests/semantic/test_pk_int16_gpu_fixtures.pyruns the same disassembly through the translator and the interpreter and checks the headers,CS_DUMPSand the runner table against it.docs/design.mdanddocs/shader_validation.mdname the fixtures and the measured result. The.sfiles undertests/semantic/fixtures/disasm/are generated from the author's hand-written.asmsources bytests/semantic/regen_fixtures.py(the marker-based mechanism already on main), not a dump from the game.Tested
python3 -m unittest discover -s tests/semantic -p "test_pk_int16_gpu_fixtures.py": 3 tests, OK.python3 -m pytest tests/test_shader_checks.py -x -q: 91 passed, 333 subtests passed.python3 tests/semantic/regen_fixtures.py --check: clean.RAPHAEL_MENDOCINO, Mesa 27.0.0-devel, 2/2 fixtures, 16/16 words exact.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (No new rule; the existing row now names the GPU confirmation.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.