d3d12 checks: measure constant and raw buffer views at every 16-byte offset #552

Closed
NickStallman wants to merge 1 commit from upstream-pr/552 into main
NickStallman commented 2026-11-29 22:29:45 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T22:29:45Z.


Refs #251. Three D3D12 controls that run only when named; tuxbox.py check runs the same cases as before. No provider, translator or cached-shader change.

  • cbv-views compares root and table CBVs with root and raw table SRVs at 17 offsets (0 to 256, step 16), a 48-byte window, fixed and dynamic indices, odd offsets through CopyDescriptors. It reports how many offsets read right per view and what a read past the window returns (@akimfomin's boundary check). It fails unless the SRVs are 17/17 and the table SRV returns zero past its end; CBVs are reported, not judged.
  • root-cbv-graphics and root-cbv-mesh read a root CBV in VS or MS and PS, under the launcher's settings. --stock-cbv runs them without.

Measured

GE-Proton11-14, provider and guests built from this branch. cbv-views always takes inherited settings (it doesn't use the launcher's layer); the other two take the launcher's unless --stock-cbv. "noheap" is VKD3D_CONFIG=no_descriptor_heap on top of the launcher settings.

RTX 5090 (10de:2b85, 620.70.10) AMD iGPU (1002:13c0, RADV, Mesa 26.0.8)
table CBV / root CBV, read right (launcher, stock and noheap runs the same) 5/17 / 5/17 17/17 / 17/17
raw table SRV / root SRV, read right 17/17 / 17/17 17/17 / 17/17
read past the 48-byte view CBV and root SRV: next memory. Table SRV: zero CBV and root SRV: next memory. Table SRV: zero
root-cbv-graphics, launcher settings 17/17 17/17
same, stock settings 5/17, the wrong offsets listed are in the pixel stage 17/17
root-cbv-mesh, launcher settings 17/17 17/17
same, stock settings 5/17 (as above) 17/17

vkd3d logged VK_EXT_descriptor_heap enabled in the stock runs on the 5090.

Tests

  • python tuxbox.py check --no-gpu: passed. Three mutations (drop the past=zero marker, let the cases into the default set, let them into check.py) each fail a test.
  • The three cases on both cards, as above.

Not run: the full GPU check (these cases aren't part of it), Windows, Lanes, the game. It does not measure the layer for cbv-views, NVIDIA frame cost, or GPU-written data.

  • Full python tuxbox.py check of bc407de0 (rebased onto e5d2e913; no change to the patch): RTX 5090 (10de:2b85, 620.70.10) 200 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 199 pass, 0 fail. GE-Proton11-14.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5555833252 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/552). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-29T22:29:45Z. --- Refs #251. Three D3D12 controls that run only when named; `tuxbox.py check` runs the same cases as before. No provider, translator or cached-shader change. - `cbv-views` compares root and table CBVs with root and raw table SRVs at 17 offsets (0 to 256, step 16), a 48-byte window, fixed and dynamic indices, odd offsets through CopyDescriptors. It reports how many offsets read right per view and what a read past the window returns (@akimfomin's boundary check). It fails unless the SRVs are 17/17 and the table SRV returns zero past its end; CBVs are reported, not judged. - `root-cbv-graphics` and `root-cbv-mesh` read a root CBV in VS or MS and PS, under the launcher's settings. `--stock-cbv` runs them without. ## Measured GE-Proton11-14, provider and guests built from this branch. `cbv-views` always takes inherited settings (it doesn't use the launcher's layer); the other two take the launcher's unless `--stock-cbv`. "noheap" is `VKD3D_CONFIG=no_descriptor_heap` on top of the launcher settings. | | RTX 5090 (`10de:2b85`, 620.70.10) | AMD iGPU (`1002:13c0`, RADV, Mesa 26.0.8) | |---|---|---| | table CBV / root CBV, read right (launcher, stock and noheap runs the same) | **5/17** / **5/17** | 17/17 / 17/17 | | **raw table SRV** / root SRV, read right | **17/17** / **17/17** | 17/17 / 17/17 | | read past the 48-byte view | CBV and root SRV: next memory. **Table SRV: zero** | CBV and root SRV: next memory. Table SRV: zero | | `root-cbv-graphics`, launcher settings | 17/17 | 17/17 | | same, stock settings | **5/17**, the wrong offsets listed are in the pixel stage | 17/17 | | `root-cbv-mesh`, launcher settings | 17/17 | 17/17 | | same, stock settings | **5/17** (as above) | 17/17 | vkd3d logged `VK_EXT_descriptor_heap enabled` in the stock runs on the 5090. ## Tests - `python tuxbox.py check --no-gpu`: passed. Three mutations (drop the past=zero marker, let the cases into the default set, let them into check.py) each fail a test. - The three cases on both cards, as above. **Not run:** the full GPU check (these cases aren't part of it), Windows, Lanes, the game. It does not measure the layer for `cbv-views`, NVIDIA frame cost, or GPU-written data. - Full `python tuxbox.py check` of bc407de0 (rebased onto e5d2e913; no change to the patch): RTX 5090 (`10de:2b85`, 620.70.10) 200 pass, 0 fail; AMD iGPU (`1002:13c0`, RADV) 199 pass, 0 fail. GE-Proton11-14. Evidence: TuxBox check of bc407de07de2, no uncommitted changes, GPU 10de:2b85: 16 passed, 0 failed, 0 not run Evidence: TuxBox check of bc407de07de2, no uncommitted changes, GPU 1002:13c0: 16 passed, 0 failed, 0 not run 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NickStallman commented 2026-11-30 04:57:40 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T04:57:40Z.


Rebased onto e5d2e913 (patch unchanged). The Miri job failed here and on #561 in compile_gate::tests::zero_slots_means_unlimited (assertion failed: peak(&Gate::new(0), 6) > 2, tests/compile_gate.rs:29). Neither PR touches that code and main's own run of the job passed, so it looks timing-dependent under Miri; three other pushes of ours today passed. I don't have a fix to offer yet, and can't rerun jobs here.

<!-- greyfinch-sync:brcly/TuxBox:comment:7269232956 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/552#issuecomment-7269232956). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-30T04:57:40Z. --- Rebased onto e5d2e913 (patch unchanged). The Miri job failed here and on #561 in `compile_gate::tests::zero_slots_means_unlimited` (`assertion failed: peak(&Gate::new(0), 6) > 2`, `tests/compile_gate.rs:29`). Neither PR touches that code and main's own run of the job passed, so it looks timing-dependent under Miri; three other pushes of ours today passed. I don't have a fix to offer yet, and can't rerun jobs here.
brcly commented 2026-11-30 09:54:34 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T09:54:34Z.


Merged into main as 3c2a9978 (squashed and credited to you). Thanks.

Your numbers reproduce on a second NVIDIA card, an RTX 4070 Ti SUPER (10de:2705, GE-Proton11-14):

  • cbv-views: root-cbv=5/17 table-cbv=5/17 root-srv=17/17 table-srv=17/17, with table-srv-past=zero and the rest next.
  • root-cbv-graphics and root-cbv-mesh: 17/17 under the launcher's settings.
  • root-cbv-graphics --stock-cbv: fails.

The Miri failure you saw in zero_slots_means_unlimited was ours. It's marked on main now.

<!-- greyfinch-sync:brcly/TuxBox:comment:7274850219 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/552#issuecomment-7274850219). Originally posted by [brcly](https://github.com/brcly) on 2026-11-30T09:54:34Z. --- Merged into main as 3c2a9978 (squashed and credited to you). Thanks. Your numbers reproduce on a second NVIDIA card, an RTX 4070 Ti SUPER (`10de:2705`, GE-Proton11-14): - `cbv-views`: `root-cbv=5/17 table-cbv=5/17 root-srv=17/17 table-srv=17/17`, with `table-srv-past=zero` and the rest `next`. - `root-cbv-graphics` and `root-cbv-mesh`: 17/17 under the launcher's settings. - `root-cbv-graphics --stock-cbv`: fails. The Miri failure you saw in `zero_slots_means_unlimited` was ours. It's marked on main now.
akimfomin commented 2026-11-30 10:03:12 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by akimfomin on 2026-11-30T10:03:12Z.


@brcly Thanks for re-running the exact 4070 Ti SUPER and confirming the bounded-view result. That gives PortBridge an independent result to link for the 48-byte boundary control. I’ll carry the same table-vs-root and past-end checks into the comparison on native Windows. I’ll post those results here when we have them.

<!-- greyfinch-sync:brcly/TuxBox:comment:7275049588 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/552#issuecomment-7275049588). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-30T10:03:12Z. --- @brcly Thanks for re-running the exact 4070 Ti SUPER and confirming the bounded-view result. That gives PortBridge an independent result to link for the 48-byte boundary control. I’ll carry the same table-vs-root and past-end checks into the comparison on native Windows. I’ll post those results here when we have them.

Pull request closed

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!552
No description provided.