d3d12: report whether table constant buffers are read at 16-byte offsets #561
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/561"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T23:31:40Z.
Refs #251 (announced on #533). Piece 1 of the stack; it stands alone and nothing uses it.
The host profile gains
cbv-offset=exact|rounded|unknown, measured by reading a table CBV at offsets 0, 16, 32 and 48 through the D3D12 implementation in use, so the answer changes with the launcher's layer.TUXBOX_HOST_PROFILE=cbv-offset=...replaces it. Only reported; nothing chooses a path from it. It is measured only when logging is on. Native Windows isn't asked, because its runtime may remove the device over an unaligned view.Tested
The host profile unit tests under Wine with no GPU; 2 mutations each fail one.
python tuxbox.py check --no-gpupassed on the whole stack (611a2fee); the full check below is this commit alone.AMD iGPU (
1002:13c0, RADV, GE-Proton11-14), on the stack this commit begins (611a2fee, which contains it): measurescbv-offset=exact; full check 201 pass, 0 fail.RTX 5090 (
10de:2b85, 620.70.10, GE-Proton11-14), same stack, raw views allowed by the test and the offsets not forced: the probe measurescbv-offset=roundedand the stack takes raw views; the raw-mode suites pass (52 of 52). The full check is 201 pass, 1 fail:translated-meshhit its 45 s limit (36 of 152 fields in, all right) at load 15, and passes in 3 of 3 separate runs (load 11 to 15).Full
python tuxbox.py checkof7030aae2(rebased ontoe5d2e913; three checked casts and the reformat; no change in behaviour): RTX 5090 (10de:2b85, 620.70.10) 200 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 199 pass, 0 fail. GE-Proton11-14.Not run: start-up time, the game. From #552's numbers I expect an RTX 5090 to report
roundedwith stock settings andexactwith the layer, and AMDexact.106120ca(859d9ab3). Upstream'sdoublesfield now sits besidecbv-offset, which comes last in the profile line, and the test covers both. Under GE-Proton11-15: the host-profile unit tests under Wine, 8 of 8 pass.check --no-gpupasses 13 of 13.check --changed 106120ca: RTX 5090 (10de:2b85, 620.70.10) 16 passed, 0 failed. AMD iGPU (1002:13c0, RADV, Mesa 26.0.8): 15 passed, 1 failed. The failure is three Lanes selftests that fail the same way on main106120caon this card (#656):Evidence: TuxBox check of
859d9ab37d, no uncommitted changes, no GPU checks: 13 passed, 0 failed, 0 not runEvidence: TuxBox check of
859d9ab37d, no uncommitted changes, GPU 10de:2b85: 16 passed, 0 failed, 0 not runEvidence: TuxBox check of
859d9ab37d, no uncommitted changes, GPU 1002:13c0: 15 passed, 1 failed, 0 not run🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:08Z.
Heads-up: main just landed a large cleanup (up to
e5d2e913), so this PR needs a rebase.rustfmt.toml).unwrap(), lossyascasts and undocumentedunsafeoutside tests.cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests.The least painful way is to format your branch first, so the rebase only shows real changes:
Then run
python tuxbox.py check --no-gpu, which now includes the format step.If clippy flags something new:
Fromfor widening,TryFromfor narrowing, and a mask for bit fields.unwrap(): use?, orexpectwith the reason it can't fail.unsafeblock: it needs a// SAFETY:comment.CONTRIBUTING's "Code checks" section lists the commands. Thanks!
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T09:54:47Z.
Thanks. Measuring what the driver does, rather than picking by vendor, is the right foundation for #251. I've just merged #552, and its numbers reproduce on an RTX 4070 Ti SUPER.
As you say, though, nothing uses this piece yet. It adds a probe at device creation (when logging is on) and one field in a log line. By itself that isn't something we'd merge, so I'm holding it until the piece that chooses a path from
cbv-offsetis ready. Then please open them together, or put this commit at the bottom of that PR, so we can judge the probe by what it decides. When you do, please include the startup cost of the probe on both cards, since it runs before the title gets its device.Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-02T21:31:03Z.
Thanks, report-only with a full check on both vendors is what we want for piece 1. It now conflicts with main in
runtime/d3d12/src/device/host_profile.rs,runtime/d3d12/src/tests/device/host_profile.rsanddocs/USAGE.md(the host profile has gained fields since you branched). Could you rebase onto main? We'll merge once it's clean and CI is green.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-03T10:20:52Z.
Rebased onto
106120ca(859d9ab3). Upstream'sdoublesfield andcbv-offsetare both kept, withcbv-offsetlast in the profile line, and the test covers both.check --no-gpupasses 13 of 13 and the RTX 5090 check passes 16 of 16. On the AMD iGPU, the only failures are three Lanes selftests that fail the same way on main106120caon that card (#656). The details are in the description. I'll watch CI.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.