dxbc, xshader: read four-word typed UAVs in a mesh pipeline's pixel layout #214

Manually merged
github merged 1 commit from github-bot/gh-214 into main 2026-11-26 08:27:38 +00:00 AGit
Owner

@⁠NickStallman on GitHub · 2026-11-26 07:51 UTC · original
NickStallman:fix/xshader-unresolved-image-lz → main · +92 −0 · 4 files · 1 commits · merged 2026-11-26 08:26 UTC

In ProjectScarlett's world load, 170 distinct mesh-pipeline pixel shaders were refused with unresolved image [image_sample_lz]. This was the most common refusal there. The root attached to them puts a UAV (u7) at the slot where the program reads t91, so the sample resolved to a UAV.

#177 lays such pixel tables out as the program reads them (MeshLayout::from_pixel_shader). But read_stage in mesh_table.rs gave up on a record type these programs have: a four-word typed UAV (class 0x303, shape 4, PSV type 6). No pixel layout was built, the pixel stage was translated against the title's root, and that failed.

  • mesh_table.rs: read a four-word typed UAV in pixel programs when PSV names the register as a typed UAV and not a structured one. This is the same pattern as #202 for typed SRV buffers.
  • image.rs: a sample or gather that resolves to a table UAV now says <op> reads table UAV u<N>: the root does not describe the program's table instead of unresolved image. The outcome is unchanged.
  • Tests: pixel_layout_reads_four_word_typed_unordered_access_views and sampling_a_root_uav_slot_names_the_mismatched_root.

Result

  • Offline, against the prefix cache: rebuilding these requests the way the runtime now does translates 240 of the 241 cached refusals of this kind, including all 170 from the world load. Across all 21,867 cached requests, nothing else changed.
  • In game, RTX 5090: unresolved image refusals during the world load went from 46 to 0 between two runs on the same save.

Checks

  • RTX 5090, NVIDIA 595.99.02, GE-Proton11-14: tuxbox.py check passed every group.
  • AMD Raphael iGPU, RADV, Mesa 26.0.8: every group passed except the five guest-present* gates. They fail on this machine for an unrelated reason, as in #212.
  • cargo test for the shader compiler (326) and tuxbox-dxbc (66): OK. Python tests: 368 OK.

🤖 Generated with Claude Code

**@⁠NickStallman** on GitHub · 2026-11-26 07:51 UTC · [original](https://github.com/brcly/TuxBox/pull/214) `NickStallman:fix/xshader-unresolved-image-lz` → `main` · +92 −0 · 4 files · 1 commits · merged 2026-11-26 08:26 UTC In ProjectScarlett's world load, 170 distinct mesh-pipeline pixel shaders were refused with `unresolved image [image_sample_lz]`. This was the most common refusal there. The root attached to them puts a UAV (`u7`) at the slot where the program reads `t91`, so the sample resolved to a UAV. #177 lays such pixel tables out as the program reads them (`MeshLayout::from_pixel_shader`). But `read_stage` in `mesh_table.rs` gave up on a record type these programs have: a four-word typed UAV (class `0x303`, shape 4, PSV type 6). No pixel layout was built, the pixel stage was translated against the title's root, and that failed. - `mesh_table.rs`: read a four-word typed UAV in pixel programs when PSV names the register as a typed UAV and not a structured one. This is the same pattern as #202 for typed SRV buffers. - `image.rs`: a sample or gather that resolves to a table UAV now says `<op> reads table UAV u<N>: the root does not describe the program's table` instead of `unresolved image`. The outcome is unchanged. - Tests: `pixel_layout_reads_four_word_typed_unordered_access_views` and `sampling_a_root_uav_slot_names_the_mismatched_root`. **Result** - Offline, against the prefix cache: rebuilding these requests the way the runtime now does translates 240 of the 241 cached refusals of this kind, including all 170 from the world load. Across all 21,867 cached requests, nothing else changed. - In game, RTX 5090: `unresolved image` refusals during the world load went from 46 to 0 between two runs on the same save. **Checks** - RTX 5090, NVIDIA 595.99.02, GE-Proton11-14: `tuxbox.py check` passed every group. - AMD Raphael iGPU, RADV, Mesa 26.0.8: every group passed except the five `guest-present*` gates. They fail on this machine for an unrelated reason, as in #212. - `cargo test` for the shader compiler (326) and `tuxbox-dxbc` (66): OK. Python tests: 368 OK. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ProjectScarlett's most common translator refusal after loading into the world
is `unresolved image [image_sample_lz]` (241 recorded requests, about 170 seen
in one run). Every one is a mesh pipeline's pixel program translated against
the title's root. That root does not describe the program's table: the program
samples t91 at s8 + 0x1740 (slot 186, per its FSSM record and PSV), where the
root declares u7. The emitter resolves the slot to a UAV and cannot sample it.

#177 lets the runtime lay out such a table as the pixel program reads it
(`MeshLayout::from_pixel_shader`, `ComputeTable::pixel_root`). These programs
also record typed UAVs with four words and shape 4 (class 0x303), which
`read_stage` did not accept, so the pixel layout was dropped and the guest
root kept. Accept that record in pixel programs when PSV names the register
as a typed UAV and not a structured one.

The emitter now names the mismatch instead of "unresolved image" when a
sample or gather resolves to a table UAV.

Against the recorded requests, with the pixel root the runtime would now build
(simulated from the root-less program and the request's root): 240 of the 241
translate; one has another root layout. The recorded rooted requests are
unchanged apart from the refusal text (19,948 of 21,867 translate before and
after).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:51:49 +00:00
github manually merged commit bb01537b24 into main 2026-11-26 08:27:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.