d3d12 checks: read a root CBV at every 16-byte offset under the launcher's settings #282

Merged
NickStallman merged 1 commit from upstream-pr/282 into main 2026-11-26 23:21:11 +00:00
NickStallman commented 2026-11-26 22:54:12 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-26T22:54:12Z.


Refs #251. Nothing checked the read that force_raw_va_cbv (5c5677b) fixes. root-cbv-window binds only at multiples of 256, and the launcher test checks the variable, not a read.

  • root_cbv_guest.cpp --offsets binds one root CBV at each 16-byte step from 0 to 256 and compares 24 words at each offset. On a mismatch it names the wrong offsets.
  • New root-cbv-offsets case in tools/check_d3d12_regressions.py. tuxbox.py check runs every case, and the controls start with vkd3d-proton's defaults, where NVIDIA reads only 5 of the 17 offsets correctly. So this case takes its variables from configure_console_cbv, the function tuxbox.py run calls: the constant-buffer layer or the Proton build feature, plus force_raw_va_cbv. The other cases are unchanged.
  • The receipt records the setting and the layer name. If the layer can't be built, the case fails without running the guest, because AMD would pass without it.
  • The case needs a C compiler and Vulkan headers, as the launcher does. CONTRIBUTING.md now says so.

Lanes doesn't exercise this: Lanes starts through Host.run, which sets neither the layer nor the setting, so it is a D3D12 control. #271 adds an explicit --cbv-mode stock|launcher switch to the same runner. If that lands first, this case can use its launcher mode in place of its own per-case setting, and I'll rebase onto it.

Measured (RTX 5090, driver 620.70.10, GE-Proton11-14, vkd3d-proton v3.1-83):

root CBV offsets read correctly
this case, as committed (layer + force_raw_va_cbv) 17/17
the same with the force_raw_va_cbv line removed from console_cbv.py 5/17, wrong at 16, 32, 48, 80 … 240
AMD Raphael iGPU, RADV 26.0.8, as committed 17/17

The case fails on NVIDIA if 5c5677b's setting is removed.

Checks (on e76ff6a):

  • python -m unittest discover -s tests -q: OK. Four new tests cover the receipt, launcher_cbv on both the layer and the fork routes, the settings reaching only this case, and the setup-failure path.
  • AMD Raphael iGPU (1002:13c0), RADV (Mesa 26.0.8), GE-Proton11-14: the full python tuxbox.py check --adapter 1002:13c0 --proton … --prefix … --windows-dxc … passed, 120 gates, including root-cbv-offsets (17/17).
  • RTX 5090 (10de:2b85), driver 620.70.10, GE-Proton11-14: the same full check passed, 120 gates, including root-cbv-offsets (17/17).

Not covered: root CBVs in a graphics or mesh pipeline, and table CBVs.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5518241700 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/282). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-26T22:54:12Z. --- Refs #251. Nothing checked the read that `force_raw_va_cbv` (5c5677b) fixes. `root-cbv-window` binds only at multiples of 256, and the launcher test checks the variable, not a read. - `root_cbv_guest.cpp --offsets` binds one root CBV at each 16-byte step from 0 to 256 and compares 24 words at each offset. On a mismatch it names the wrong offsets. - New `root-cbv-offsets` case in `tools/check_d3d12_regressions.py`. `tuxbox.py check` runs every case, and the controls start with vkd3d-proton's defaults, where NVIDIA reads only 5 of the 17 offsets correctly. So this case takes its variables from `configure_console_cbv`, the function `tuxbox.py run` calls: the constant-buffer layer or the Proton build feature, plus `force_raw_va_cbv`. The other cases are unchanged. - The receipt records the setting and the layer name. If the layer can't be built, the case fails without running the guest, because AMD would pass without it. - The case needs a C compiler and Vulkan headers, as the launcher does. `CONTRIBUTING.md` now says so. Lanes doesn't exercise this: Lanes starts through `Host.run`, which sets neither the layer nor the setting, so it is a D3D12 control. #271 adds an explicit `--cbv-mode stock|launcher` switch to the same runner. If that lands first, this case can use its launcher mode in place of its own per-case setting, and I'll rebase onto it. **Measured** (RTX 5090, driver 620.70.10, GE-Proton11-14, vkd3d-proton v3.1-83): | | root CBV offsets read correctly | |---|---:| | this case, as committed (layer + `force_raw_va_cbv`) | 17/17 | | the same with the `force_raw_va_cbv` line removed from `console_cbv.py` | 5/17, wrong at 16, 32, 48, 80 … 240 | | AMD Raphael iGPU, RADV 26.0.8, as committed | 17/17 | The case fails on NVIDIA if 5c5677b's setting is removed. **Checks** (on `e76ff6a`): - `python -m unittest discover -s tests -q`: OK. Four new tests cover the receipt, `launcher_cbv` on both the layer and the fork routes, the settings reaching only this case, and the setup-failure path. - AMD Raphael iGPU (1002:13c0), RADV (Mesa 26.0.8), GE-Proton11-14: the full `python tuxbox.py check --adapter 1002:13c0 --proton … --prefix … --windows-dxc …` passed, 120 gates, including `root-cbv-offsets` (17/17). - RTX 5090 (10de:2b85), driver 620.70.10, GE-Proton11-14: the same full check passed, 120 gates, including `root-cbv-offsets` (17/17). Not covered: root CBVs in a graphics or mesh pipeline, and table CBVs. 🤖 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!282
No description provided.