xshader: count the registers a packed 16-bit image result writes #607

Merged
NickStallman merged 1 commit from upstream-pr/607 into main 2026-12-01 03:18:24 +00:00
NickStallman commented 2026-12-01 00:55:33 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T00:55:33Z.


The pass that follows heap offsets through vector registers forgets one when an instruction writes its register. For an image result it counted one register per enabled component, as an upper bound. A result returned as 16-bit halves packs two components into each register, so a four-component sample writes two registers, and a heap offset held in the next one was forgotten. The descriptor fetch through it was then refused as "dynamic soffset unsupported". The count is now the registers the emitter writes for such a result. Gathers and atomics keep their bound.

Refs #533.

Measured

  • Recorded ProjectScarlett requests (branch against its base 34be158b, both hosts, links, stride retries): 4 pixel requests newly accepted (two material families); 0 changed, 0 newly refused, no refusal text changed. All 4 compile with DXC 1.9.2609 and pass dxv.
  • Unit tests and mutations: 2 unit tests; 4 mutations, each caught (one survived at first; a case with the 16-bit-coordinate bit set and the packed-result bit clear now catches it).
  • GPU check pixel-heap-offsets gains a program that keeps a heap offset in the register after a packed sample's two. It is refused without the change. 24 cases on each card, 0 failures.
  • Full python tuxbox.py check of f868ffc4 (GE-Proton11-15): RTX 5090 (10de:2b85, 620.70.10) 205 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 204 pass, 0 fail.

Evidence: TuxBox check of f868ffc4a3, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run
Evidence: TuxBox check of f868ffc4a3, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run

Not covered

  • The game has not been run with this. In our runs' failure tables 2 failed mesh+pixel rows per run have one of these as their pixel stage; whether they then build and draw is not shown.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5576675513 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/607). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-12-01T00:55:33Z. --- The pass that follows heap offsets through vector registers forgets one when an instruction writes its register. For an image result it counted one register per enabled component, as an upper bound. A result returned as 16-bit halves packs two components into each register, so a four-component sample writes two registers, and a heap offset held in the next one was forgotten. The descriptor fetch through it was then refused as "dynamic soffset unsupported". The count is now the registers the emitter writes for such a result. Gathers and atomics keep their bound. Refs #533. ## Measured - **Recorded ProjectScarlett requests** (branch against its base 34be158b, both hosts, links, stride retries): 4 pixel requests newly accepted (two material families); 0 changed, 0 newly refused, no refusal text changed. All 4 compile with DXC 1.9.2609 and pass dxv. - **Unit tests and mutations:** 2 unit tests; 4 mutations, each caught (one survived at first; a case with the 16-bit-coordinate bit set and the packed-result bit clear now catches it). - **GPU check `pixel-heap-offsets`** gains a program that keeps a heap offset in the register after a packed sample's two. It is refused without the change. 24 cases on each card, 0 failures. - Full `python tuxbox.py check` of f868ffc4 (GE-Proton11-15): RTX 5090 (`10de:2b85`, 620.70.10) 205 pass, 0 fail; AMD iGPU (`1002:13c0`, RADV) 204 pass, 0 fail. Evidence: TuxBox check of f868ffc4a34d, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run Evidence: TuxBox check of f868ffc4a34d, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run ## Not covered - The game has not been run with this. In our runs' failure tables 2 failed mesh+pixel rows per run have one of these as their pixel stage; whether they then build and draw is not shown. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!607
No description provided.