dxbc: recover corroborated descriptors in later compute tables #254

Merged
Valdi320 merged 1 commit from upstream-pr/254 into main 2026-11-26 21:27:17 +00:00
Valdi320 commented 2026-11-26 17:22:54 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T17:22:54Z.


Candidate for two refusal classes in #233. The existing read_bindings recognizes later compute table locations, but descriptor_class used by uncovered_descriptor only recognized tables 0/1. Apply the same width normalization after independent user/used row and SGPR checks. Also correct the distinction between root parameter descriptor types and descriptor range types when detecting register collisions; refuse an already occupied synthetic private name.

Two DXBC regression tests fail before the change. New cases cover raw/typed SRV and UAV, CBV in the third table (s6), reconstruction of the missing-root-descriptor list, wrong parameter/SGPR and occupied alias names. The translator fixture uses a real atomic add through a recovered raw UAV at slot 2; it refuses an explicitly occupied SRV or absent corroborating metadata. No broad reinterpretation of SRVs as UAVs.

All six no-GPU groups passed, including 70 DXBC tests. The new GPU control ran emitted HLSL through DXC/DXV and a real three-table D3D12 root on RTX 4080 / GE-Proton11-14: 8 cases, 3072 words, 0 mismatches (128 modified, 2944 preserved). Used the previously built D3D12 provider for this isolated native compute control; it tests emitted HLSL and the reconstructed table shape, not the new runtime's automatic root reconstruction. Full GPU/Lanes and AMD validation outstanding.

The real captured 24 s6 and 10 atomic failures from #233 are not locally available, so this is a demonstrated defect and a candidate, not confirmation all title programs are fixed. Please test against those pairs locally if convenient. No title files included. Draft pending review.

<!-- greyfinch-sync:brcly/TuxBox:issue:5514453520 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T17:22:54Z. --- Candidate for two refusal classes in #233. The existing read_bindings recognizes later compute table locations, but descriptor_class used by uncovered_descriptor only recognized tables 0/1. Apply the same width normalization after independent user/used row and SGPR checks. Also correct the distinction between root parameter descriptor types and descriptor range types when detecting register collisions; refuse an already occupied synthetic private name. Two DXBC regression tests fail before the change. New cases cover raw/typed SRV and UAV, CBV in the third table (s6), reconstruction of the missing-root-descriptor list, wrong parameter/SGPR and occupied alias names. The translator fixture uses a real atomic add through a recovered raw UAV at slot 2; it refuses an explicitly occupied SRV or absent corroborating metadata. No broad reinterpretation of SRVs as UAVs. All six no-GPU groups passed, including 70 DXBC tests. The new GPU control ran emitted HLSL through DXC/DXV and a real three-table D3D12 root on RTX 4080 / GE-Proton11-14: 8 cases, 3072 words, 0 mismatches (128 modified, 2944 preserved). Used the previously built D3D12 provider for this isolated native compute control; it tests emitted HLSL and the reconstructed table shape, not the new runtime's automatic root reconstruction. Full GPU/Lanes and AMD validation outstanding. The real captured 24 s6 and 10 atomic failures from #233 are not locally available, so this is a demonstrated defect and a candidate, not confirmation all title programs are fixed. Please test against those pairs locally if convenient. No title files included. Draft pending review.
gtb-sbe commented 2026-11-26 19:40:03 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-26T19:40:03Z.


@Valdi320 I tested #254 offline against the captured pairs from #233.

unmapped descriptor at s6 + 0x_ (24 pairs): 18 now translate. All 24 have the same root, 7e366593 (three tables, root SRV t1, space3, three root constants, flags 0xc00). With 54c2ce3, missing_root_descriptors now returns b10, space2 at table 2 slot 1 for every one of them, so append_corroborated_ranges builds a Reflected root.

  • 15 of them had no reflected root before (last arm). The other 9 already had one (u235 and u236 in space 32700, table 0) and now also get b10.
  • Translated against the root the provider builds, 18 of the 24 translate. All 18 pass DXC + DXV (8 cs_6_6, 10 cs_6_0) and dxil-spirv 34f0ff8 conversion and validation. Every register they declare is in that root.
  • The other 6 (2580c6c3, 5a8fc834, 5c555885, cf85ed51, d52f30e0, f038ad55) get past s6 and then refuse with mubuf at 0x_: atomic on a non-UAV buffer.

atomic on a non-UAV buffer (11 pairs, 17 with the 6 above): unchanged. In all 17, the FSSM row of the atomic buffer is a UAV (class 0x303), but the root covers that slot with an SRV range. The slots are table 0 slots 119/120 (roots 7e366593 and c78d33d8) or 186/187 (c78d33d8), and table 1 slots 1-3 for one pair with a two-table root (462cddf0; it took another arm in run 11, which is why #233 counted 10). None of these slots is uncovered or in a later table, so this PR's recovery does not apply. In these captures the class is a UAV slot under an SRV range, not a UAV slot missing from a later table. Your fixture's shape does not occur here.

No regressions: no pair newly refuses, and nothing changes outside root 7e366593.

How I checked the provider side: I ported the compute branch of reflected_root up to append_corroborated_ranges against the PR's tuxbox-dxbc. The port writes the appended root in the layout of vkd3d-proton's D3D12SerializeVersionedRootSignature. It reproduces two variant digests our run 11 recorded for this root (be3526d8 and 43ab2740), so the translations above use the same root bytes the provider would.

Arms: all 24 now take the Reflected arm, with or without #260. For the 6 atomic ones that arm still falls back to the root-less translation (.or_else(prepared), the fallback brcly asked about on #235), and the driver then rejects it. With main + #260 they would get a stand-in with the refusal on record instead. They fail either way.

Not run: GPU, a game run, third-table-atomic on AMD, vkd3d with real bindings, raster. Open: whether the provider's table bookkeeping handles the appended table 2 slot at dispatch; only a game run shows that. Your combined branch 0b86078 gives the same results as #252 and #254 together.

Host: RX 9060 XT, Mesa 26.2.6 RADV, GE-Proton11-14. This only sets the dxil-spirv version; nothing ran on the GPU. The translator and dxbc sources at 54c2ce3 are identical to main f0ffa49, where the baseline xshader was built.

The offline runs and this write-up were done with an AI coding agent (Claude Code) on this machine.

<!-- greyfinch-sync:brcly/TuxBox:comment:7201834193 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254#issuecomment-7201834193). Originally posted by [gtb-sbe](https://github.com/gtb-sbe) on 2026-11-26T19:40:03Z. --- @Valdi320 I tested #254 offline against the captured pairs from #233. **`unmapped descriptor at s6 + 0x_` (24 pairs): 18 now translate.** All 24 have the same root, `7e366593` (three tables, root SRV `t1, space3`, three root constants, flags `0xc00`). With `54c2ce3`, `missing_root_descriptors` now returns `b10, space2` at table 2 slot 1 for every one of them, so `append_corroborated_ranges` builds a `Reflected` root. - 15 of them had no reflected root before (last arm). The other 9 already had one (`u235` and `u236` in space 32700, table 0) and now also get `b10`. - Translated against the root the provider builds, 18 of the 24 translate. All 18 pass DXC + DXV (8 `cs_6_6`, 10 `cs_6_0`) and dxil-spirv `34f0ff8` conversion and validation. Every register they declare is in that root. - The other 6 (`2580c6c3`, `5a8fc834`, `5c555885`, `cf85ed51`, `d52f30e0`, `f038ad55`) get past `s6` and then refuse with `mubuf at 0x_: atomic on a non-UAV buffer`. **`atomic on a non-UAV buffer` (11 pairs, 17 with the 6 above): unchanged.** In all 17, the FSSM row of the atomic buffer is a UAV (class `0x303`), but the root covers that slot with an SRV range. The slots are table 0 slots 119/120 (roots `7e366593` and `c78d33d8`) or 186/187 (`c78d33d8`), and table 1 slots 1-3 for one pair with a two-table root (`462cddf0`; it took another arm in run 11, which is why #233 counted 10). None of these slots is uncovered or in a later table, so this PR's recovery does not apply. In these captures the class is a UAV slot under an SRV range, not a UAV slot missing from a later table. Your fixture's shape does not occur here. **No regressions:** no pair newly refuses, and nothing changes outside root `7e366593`. **How I checked the provider side:** I ported the compute branch of `reflected_root` up to `append_corroborated_ranges` against the PR's `tuxbox-dxbc`. The port writes the appended root in the layout of vkd3d-proton's `D3D12SerializeVersionedRootSignature`. It reproduces two variant digests our run 11 recorded for this root (`be3526d8` and `43ab2740`), so the translations above use the same root bytes the provider would. **Arms:** all 24 now take the `Reflected` arm, with or without #260. For the 6 atomic ones that arm still falls back to the root-less translation (`.or_else(prepared)`, the fallback brcly asked about on #235), and the driver then rejects it. With `main` + #260 they would get a stand-in with the refusal on record instead. They fail either way. **Not run:** GPU, a game run, `third-table-atomic` on AMD, vkd3d with real bindings, raster. Open: whether the provider's table bookkeeping handles the appended table 2 slot at dispatch; only a game run shows that. Your combined branch `0b86078` gives the same results as #252 and #254 together. **Host:** RX 9060 XT, Mesa 26.2.6 RADV, GE-Proton11-14. This only sets the dxil-spirv version; nothing ran on the GPU. The translator and `dxbc` sources at `54c2ce3` are identical to `main` `f0ffa49`, where the baseline `xshader` was built. _The offline runs and this write-up were done with an AI coding agent (Claude Code) on this machine._
Valdi320 commented 2026-11-26 20:06:58 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T20:06:58Z.


@gtb-sbe thanks for the real corpus result and the specific warning about dispatch bookkeeping. I integrated #252 + #254 + #260 on b3184d3 and reproduced a real synthetic dispatch bug, not just a translation refusal: github.com/Valdi320/TuxBox@d0e7b7e2ef.

New Lanes scenario compute-root-recovery builds a version 1.1 root with three tables, one pre-existing UAV in table 0 and a corroborated uncovered UAV in table 2 slot 2. Only the latter has user-data corroboration, forcing the partial append path. Logical 128 descriptors / resident cap 64, views based at logical 80. The old provider reports 3 reflected slots and leaves view 0 unchanged. Rebuilt provider with the fix reports 8 slots and writes both expected words; the same guest binary passes. The final strengthened test verifies all 1024 words (including guards) and that no stand-in was used. Root replacement invalidates arguments in unchanged tables too: append_corroborated_ranges now includes finite extents and SRV/UAV spans for ALL tables, not only modified ones, and refuses the append path for nonfinite tables instead of leaving incomplete bookkeeping. This is conservative and can require more resident descriptors; no performance claim.

Final combined tree: six code groups, 12/12 selected Lanes (including #260 compute-root and new recovery), 4/4 translator checks (root-srv-remap, third-table-atomic, raw-index and main's mask-ballots paired route), 7/7 D3D12 controls (CBV window, tables, heaps, alias, copy, placement, stream) on RTX 4080 / GE-Proton11-14. The first provider rebuild succeeded but a subsequent unrelated C++ fixture compile exited 137; the corrected DLL was verified different from the failing DLL, staged for the same-guest comparison, then the full Lanes rebuild and final controls passed. No game run. Native Wave64 not exercised on this GPU; AMD and full check still outstanding. I kept individual PR heads unchanged and published the integration/reproducer rather than a redundant PR containing #260. The production compute_table.rs patch applies to main as well.

The 17 covered-SRV/UAV-class atomic mismatches are distinct: this does not change a covered descriptor's class. They need a safe binding proof or more evidence, not a blind SRV-to-UAV rewrite.

<!-- greyfinch-sync:brcly/TuxBox:comment:7202314998 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254#issuecomment-7202314998). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T20:06:58Z. --- @gtb-sbe thanks for the real corpus result and the specific warning about dispatch bookkeeping. I integrated #252 + #254 + #260 on b3184d3 and reproduced a real synthetic dispatch bug, not just a translation refusal: https://github.com/Valdi320/TuxBox/tree/d0e7b7e2ef4128e7fc9933172f03deac2ad78907. New Lanes scenario compute-root-recovery builds a version 1.1 root with three tables, one pre-existing UAV in table 0 and a corroborated uncovered UAV in table 2 slot 2. Only the latter has user-data corroboration, forcing the partial append path. Logical 128 descriptors / resident cap 64, views based at logical 80. The old provider reports 3 reflected slots and leaves view 0 unchanged. Rebuilt provider with the fix reports 8 slots and writes both expected words; the same guest binary passes. The final strengthened test verifies all 1024 words (including guards) and that no stand-in was used. Root replacement invalidates arguments in unchanged tables too: append_corroborated_ranges now includes finite extents and SRV/UAV spans for ALL tables, not only modified ones, and refuses the append path for nonfinite tables instead of leaving incomplete bookkeeping. This is conservative and can require more resident descriptors; no performance claim. Final combined tree: six code groups, 12/12 selected Lanes (including #260 compute-root and new recovery), 4/4 translator checks (root-srv-remap, third-table-atomic, raw-index and main's mask-ballots paired route), 7/7 D3D12 controls (CBV window, tables, heaps, alias, copy, placement, stream) on RTX 4080 / GE-Proton11-14. The first provider rebuild succeeded but a subsequent unrelated C++ fixture compile exited 137; the corrected DLL was verified different from the failing DLL, staged for the same-guest comparison, then the full Lanes rebuild and final controls passed. No game run. Native Wave64 not exercised on this GPU; AMD and full check still outstanding. I kept individual PR heads unchanged and published the integration/reproducer rather than a redundant PR containing #260. The production compute_table.rs patch applies to main as well. The 17 covered-SRV/UAV-class atomic mismatches are distinct: this does not change a covered descriptor's class. They need a safe binding proof or more evidence, not a blind SRV-to-UAV rewrite.
gtb-sbe commented 2026-11-26 20:08:52 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-26T20:08:52Z.


@Valdi320 Follow-up with the AMD run of the GPU controls at 54c2ce3.

Result: the full translator stage passes, 41/41, including third-table-atomic: 8 cases, 3072 compared words (128 result, 2944 preserved), 0 mismatches. These are the same counts as your RTX 4080 run.

Setup: RX 9060 XT (1002:7590), Mesa 26.2.6 RADV, GE-Proton11-14, Windows DXC 2026-09-29. The adapter was selected by UUID; all 42 guest logs show the RX 9060 XT. The provider DLL was an earlier local build, not one from this branch. These control guests use Proton's D3D12 and only copy it.

Not run: the rest of check (guest checks, D3D12 regression controls, Lanes) on this head.

Run with an AI coding agent (Claude Code) on this machine.

<!-- greyfinch-sync:brcly/TuxBox:comment:7202351799 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254#issuecomment-7202351799). Originally posted by [gtb-sbe](https://github.com/gtb-sbe) on 2026-11-26T20:08:52Z. --- @Valdi320 Follow-up with the AMD run of the GPU controls at `54c2ce3`. **Result:** the full translator stage passes, 41/41, including `third-table-atomic`: 8 cases, 3072 compared words (128 result, 2944 preserved), 0 mismatches. These are the same counts as your RTX 4080 run. **Setup:** RX 9060 XT (`1002:7590`), Mesa 26.2.6 RADV, GE-Proton11-14, Windows DXC 2026-09-29. The adapter was selected by UUID; all 42 guest logs show the RX 9060 XT. The provider DLL was an earlier local build, not one from this branch. These control guests use Proton's D3D12 and only copy it. **Not run:** the rest of `check` (guest checks, D3D12 regression controls, Lanes) on this head. _Run with an AI coding agent (Claude Code) on this machine._
Valdi320 commented 2026-11-26 20:12:33 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T20:12:33Z.


@gtb-sbe thanks again for the real corpus and Radeon results. We're trying to move from synthetic reproductions to the exact affected requests. Would you be able to provide all the diagnostic material needed to reproduce the remaining cases locally, to the extent you are authorized to share it?

In particular: the 17 remaining atomic descriptor-class mismatches from #233, the exact shader/root pair identifiers and sanitized FSSM/PSV/root binding layouts, relevant ISA excerpts or minimal independently redistributable reproductions, the compiler/runtime flags and the precise capture/replay steps. For the other unresolved failures, a manifest of affected requests and aggregate refusal reasons would also be very useful.

Please do not attach proprietary game executables, assets, raw retail shader archives, credentials, or other restricted material to GitHub. If there are legally shareable captures, let us know the appropriate authorized way to obtain them; otherwise, could you document how we can generate equivalent captures from our own legitimately obtained local installation? We would like to reproduce the actual failures directly rather than ask you to run repeated speculative patches.

The current integration reproducer for the recovered-table dispatch is in the previous comment. Thank you.

<!-- greyfinch-sync:brcly/TuxBox:comment:7202416168 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254#issuecomment-7202416168). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T20:12:33Z. --- @gtb-sbe thanks again for the real corpus and Radeon results. We're trying to move from synthetic reproductions to the exact affected requests. Would you be able to provide all the diagnostic material needed to reproduce the remaining cases locally, to the extent you are authorized to share it? In particular: the 17 remaining atomic descriptor-class mismatches from #233, the exact shader/root pair identifiers and sanitized FSSM/PSV/root binding layouts, relevant ISA excerpts or minimal independently redistributable reproductions, the compiler/runtime flags and the precise capture/replay steps. For the other unresolved failures, a manifest of affected requests and aggregate refusal reasons would also be very useful. Please do not attach proprietary game executables, assets, raw retail shader archives, credentials, or other restricted material to GitHub. If there are legally shareable captures, let us know the appropriate authorized way to obtain them; otherwise, could you document how we can generate equivalent captures from our own legitimately obtained local installation? We would like to reproduce the actual failures directly rather than ask you to run repeated speculative patches. The current integration reproducer for the recovered-table dispatch is in the previous comment. Thank you.
Valdi320 commented 2026-11-26 20:25:41 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by Valdi320 on 2026-11-26T20:25:41Z.


The previously reported append-root paging issue now has an independent two-table reproduction on main 95ddc5c, with no dependency on #252/#254/#260. Same guest fails before and passes after, 1024 words checked; 11/11 Lanes and six code groups passed. Standalone reviewable fix: https://github.com/brcly/TuxBox/pull/269.

<!-- greyfinch-sync:brcly/TuxBox:comment:7202667461 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254#issuecomment-7202667461). Originally posted by [Valdi320](https://github.com/Valdi320) on 2026-11-26T20:25:41Z. --- The previously reported append-root paging issue now has an independent two-table reproduction on main 95ddc5c, with no dependency on #252/#254/#260. Same guest fails before and passes after, 1024 words checked; 11/11 Lanes and six code groups passed. Standalone reviewable fix: https://github.com/brcly/TuxBox/pull/269.
gtb-sbe commented 2026-11-27 01:18:17 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-27T01:18:17Z.


@Valdi320 The material you asked for is on https://github.com/brcly/TuxBox/issues/233#issuecomment-7207161756. The tools and my results are on a branch of my fork: https://github.com/gtb-sbe/TuxBox/tree/tools-capture-replay.

In short, all 24 affected compute pairs (the 17 atomics are part of them) have FSSM used-resource rows, FSSM user-data rows and PSV rows that agree on a UAV at the slot. Only the root's range type is SRV or CBV.

  • On main, the verified table rewrite already handles the 8 pairs with two-table roots.
  • The 16 under three-table roots never reach it, because read_bindings maps a root SRV (0x100) only for raster stages. Accepting it for compute is one line, so far an offline experiment only. With it, all 16 translate, compile with DXC + DXV and convert with dxil-spirv; 15 have every register covered by the rewritten root.
  • The binding proof is still open. The comment describes the trace that would provide it, and how to generate the same captures from your copy.
<!-- greyfinch-sync:brcly/TuxBox:comment:7207180559 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/254#issuecomment-7207180559). Originally posted by [gtb-sbe](https://github.com/gtb-sbe) on 2026-11-27T01:18:17Z. --- @Valdi320 The material you asked for is on https://github.com/brcly/TuxBox/issues/233#issuecomment-7207161756. The tools and my results are on a branch of my fork: https://github.com/gtb-sbe/TuxBox/tree/tools-capture-replay. In short, all 24 affected compute pairs (the 17 atomics are part of them) have FSSM used-resource rows, FSSM user-data rows and PSV rows that agree on a UAV at the slot. Only the root's range type is SRV or CBV. - On `main`, the verified table rewrite already handles the 8 pairs with two-table roots. - The 16 under three-table roots never reach it, because `read_bindings` maps a root SRV (`0x100`) only for raster stages. Accepting it for compute is one line, so far an offline experiment only. With it, all 16 translate, compile with DXC + DXV and convert with dxil-spirv; 15 have every register covered by the rewritten root. - The binding proof is still open. The comment describes the trace that would provide it, and how to generate the same captures from your copy.
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!254
No description provided.