T7: Bindings #358

Open
opened 2026-11-28 02:03:05 +00:00 by NickStallman · 2 comments
NickStallman commented 2026-11-28 02:03:05 +00:00 (Migrated from github.com)
Contributor

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-28T02:03:05Z.


Taking T7 from ROADMAP.md: the binding refusal groups.

  • Stores and atomics to a table the root signature doesn't describe as writable: about 1,660.
  • Sampler descriptors: about 460.
  • Tables the root doesn't describe: about 500.

Plan

  • For each group, find the cause from recorded requests and the title's own root signatures. Is the root signature really read-only, or is it something we fail to recognise (a UAV hidden behind an SRV range, an alias, a bindless heap read as a table)? What do the programs actually do with it?
  • Then either fix it in the translator or runtime, with a test that fails without the fix, or write down why it can't be fixed.
  • Every change goes through the shader harness at both wave widths, with GPU checks on an AMD card (Raphael iGPU, RADV) and an NVIDIA card (RTX 5090).
  • Findings are posted here per group before any change.
<!-- greyfinch-sync:brcly/TuxBox:issue:6657544686 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/358). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-28T02:03:05Z. --- Taking T7 from [ROADMAP.md](../blob/main/docs/ROADMAP.md): the binding refusal groups. - **Stores and atomics** to a table the root signature doesn't describe as writable: about 1,660. - **Sampler descriptors:** about 460. - **Tables the root doesn't describe:** about 500. **Plan** - For each group, find the cause from recorded requests and the title's own root signatures. Is the root signature really read-only, or is it something we fail to recognise (a UAV hidden behind an SRV range, an alias, a bindless heap read as a table)? What do the programs actually do with it? - Then either fix it in the translator or runtime, with a test that fails without the fix, or write down why it can't be fixed. - Every change goes through the shader harness at both wave widths, with GPU checks on an AMD card (Raphael iGPU, RADV) and an NVIDIA card (RTX 5090). - Findings are posted here per group before any change.
NickStallman commented 2026-11-28 02:27:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-28T02:27:30Z.


These are the T7 phase-one findings. Nothing is changed yet. Measured on main at 29a79825 with the shader harness survey over a frozen copy of ProjectScarlett's recorded requests, and joined with 97 pipeline-failure records from our runs (26–28 Nov).

Headline: groups (a) and (c), and nearly all of (b), aren't real losses. They're refused attempts against a root that isn't the program's own. The provider tries the guest root, then a root rebuilt from the program's FSSM rows, then variants of that. Each attempt is recorded as a request, so a refused first attempt still shows up in the survey. Every refused program in (a) and (c) has a sibling request that translates.

On this request set the groups are 102 / 460 / 257 programs. The roadmap's figures come from a larger set (42,672 requests).

Group Refusal Requests (w64 + w32) Pipelines lost in recent runs Cause
a image_store to a non-UAV table 80 + 0 (pixel) never, in 97 runs guest root ≠ the program's layout
a atomic on a non-UAV buffer 19 + 19 (compute) 0 since 28 Nov 08:04 (13 per run before) same
a buffer_store to a non-UAV table 3 + 3 0 since 26 Nov 19:52 same
c image_sample_lz reads table UAV u7… 257 + 3 (256 pixel) 0 since 26 Nov 19:52 same
b1 sampler from literal words 434 + 3 0 in the 3 newest runs inline sampler not among the guest root's static samplers; the root rebuilt with private samplers translates
b2 sampler (None) 26 + 0 (vertex) 4 per run, in 89 of 97 runs translator: a waterfall read after an if/else join defeats the copy proof

Is the root read correctly?

  • (a) and (c): yes. The guest root really does put an SRV (or UAV) at the slot the program writes (or samples), and TuxBox follows D3D12's APPEND rules correctly. The disagreement is between the guest root and the program's own FSSM rows and PSV.
  • Example: PS_TrailMapPropGrassFlatten_UAV stores through table slots 4 and 5. The guest root's table has t16 and t2 there; FSSM says u21 and u18. The reflected sibling translates.
  • Not involved: none of these accesses goes through the heap, an alias or a root descriptor.

The one live loss, b2: four RAGE VS_[Transform|TransformSkin]_VfxVBuffer* programs.

  1. They load a sampler from the heap at a constant index.
  2. Both arms of an if/else copy it into VGPRs.
  3. After the join (s_mov_b64 exec, sM) they read it back in a v_readfirstlane waterfall.

descriptor_broadcast only accepts EXEC narrowing on that path, so it refuses. A prototype that proves the structured if/else join recovers 17 of the 26 requests, plus 24 "buffer record count" requests from a related fix, with 0 regressions. It changes 249 outputs, mostly mesh programs, which need explaining first. Each part will be its own PR, with negative tests and a GPU check of a vertex-stage waterfall, since nothing covers that today.

Other notes

  • T6: counting a program as refused only when no sibling request translates would drop about 360 requests from (a) and (c) and about 430 from (b1).
  • A misleading message: emitter/image.rs:231 says "image atomic on a non-UAV table" when the UAV isn't typed uint. No request hits it today.
  • An unverified lead: a rough placement check flags about 5,700 translated requests whose root's slot kinds disagree with FSSM. That may be the check's crudeness; we'll take one look before closing T7.
<!-- greyfinch-sync:brcly/TuxBox:comment:7232375145 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/358#issuecomment-7232375145). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-28T02:27:30Z. --- These are the T7 phase-one findings. Nothing is changed yet. Measured on `main` at `29a79825` with the shader harness survey over a frozen copy of ProjectScarlett's recorded requests, and joined with 97 pipeline-failure records from our runs (26–28 Nov). **Headline:** groups (a) and (c), and nearly all of (b), aren't real losses. They're refused attempts against a root that isn't the program's own. The provider tries the guest root, then a root rebuilt from the program's FSSM rows, then variants of that. Each attempt is recorded as a request, so a refused first attempt still shows up in the survey. Every refused program in (a) and (c) has a sibling request that translates. On this request set the groups are 102 / 460 / 257 programs. The roadmap's figures come from a larger set (42,672 requests). | Group | Refusal | Requests (w64 + w32) | Pipelines lost in recent runs | Cause | |---|---|---|---|---| | a | `image_store to a non-UAV table` | 80 + 0 (pixel) | never, in 97 runs | guest root ≠ the program's layout | | a | `atomic on a non-UAV buffer` | 19 + 19 (compute) | 0 since 28 Nov 08:04 (13 per run before) | same | | a | `buffer_store to a non-UAV table` | 3 + 3 | 0 since 26 Nov 19:52 | same | | c | `image_sample_lz reads table UAV u7…` | 257 + 3 (256 pixel) | 0 since 26 Nov 19:52 | same | | b1 | sampler from literal words | 434 + 3 | 0 in the 3 newest runs | inline sampler not among the guest root's static samplers; the root rebuilt with private samplers translates | | b2 | sampler `(None)` | 26 + 0 (vertex) | **4 per run, in 89 of 97 runs** | translator: a waterfall read after an if/else join defeats the copy proof | **Is the root read correctly?** - **(a) and (c): yes.** The guest root really does put an SRV (or UAV) at the slot the program writes (or samples), and TuxBox follows D3D12's APPEND rules correctly. The disagreement is between the guest root and the program's own FSSM rows and PSV. - **Example:** `PS_TrailMapPropGrassFlatten_UAV` stores through table slots 4 and 5. The guest root's table has `t16` and `t2` there; FSSM says `u21` and `u18`. The reflected sibling translates. - **Not involved:** none of these accesses goes through the heap, an alias or a root descriptor. **The one live loss, b2:** four RAGE `VS_[Transform|TransformSkin]_VfxVBuffer*` programs. 1. They load a sampler from the heap at a constant index. 2. Both arms of an if/else copy it into VGPRs. 3. After the join (`s_mov_b64 exec, sM`) they read it back in a `v_readfirstlane` waterfall. `descriptor_broadcast` only accepts EXEC narrowing on that path, so it refuses. A prototype that proves the structured if/else join recovers 17 of the 26 requests, plus 24 "buffer record count" requests from a related fix, with 0 regressions. It changes 249 outputs, mostly mesh programs, which need explaining first. Each part will be its own PR, with negative tests and a GPU check of a vertex-stage waterfall, since nothing covers that today. **Other notes** - **T6:** counting a program as refused only when no sibling request translates would drop about 360 requests from (a) and (c) and about 430 from (b1). - **A misleading message:** `emitter/image.rs:231` says "image atomic on a non-UAV table" when the UAV isn't typed uint. No request hits it today. - **An unverified lead:** a rough placement check flags about 5,700 *translated* requests whose root's slot kinds disagree with FSSM. That may be the check's crudeness; we'll take one look before closing T7.
NickStallman commented 2026-11-28 04:36:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-28T04:36:11Z.


The fix for group b2 is up as #370. It recovers 51 recorded VfxVBuffer vertex requests with 0 regressions. 249 mesh outputs change, and each change is only the per-lane heap sampler becoming the static heap slot the program already loads.

A correction to the findings above: the record-count change does not recover 24 requests on its own. That figure came from a combined build. The four parts only take effect together, so they are one PR. The record-count part on its own would also have been unsound: it could leave a read-back count unfilled.

<!-- greyfinch-sync:brcly/TuxBox:comment:7234143096 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/358#issuecomment-7234143096). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-28T04:36:11Z. --- The fix for group b2 is up as #370. It recovers 51 recorded VfxVBuffer vertex requests with 0 regressions. 249 mesh outputs change, and each change is only the per-lane heap sampler becoming the static heap slot the program already loads. **A correction to the findings above:** the record-count change does *not* recover 24 requests on its own. That figure came from a combined build. The four parts only take effect together, so they are one PR. The record-count part on its own would also have been unsound: it could leave a read-back count unfilled.
Sign in to join this conversation.
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#358
No description provided.