d3d12: publish textures stored through a table beside the heap write bitmap #563
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/563"
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-30T00:18:34Z.
Fixes a gap left beside #462's heap write bitmap.
The bitmap names the heap slots a program stored through. A store through a table descriptor sets no bit. When the resource index map is also bound, the whole heap counts as only read, including the program's own tables, so a texture it stores through a table is never published to title memory. Without the map those tables already count as written. This does the same with it; the rest of the heap stays read-only.
Three commits: the decision about the view sets moved into one function (no behaviour change intended), a Lanes scenario, then the fix with unit tests.
Measured, AMD iGPU (
1002:13c0, RADV, GE-Proton11-14),verify --only lanes-bindless-compute:lanes-bindless-table-heap-store-wideand-constrained. The table store's word is in title memory 0 times of 65,53610de:2b85, 620.70.10, GE-Proton11-14), one run each: before 24 pass, 2 fail (the same two); with the fix 26 pass, 0 fail.mainthere (no ray tracing, mesh shaders or barycentrics on that card).check --no-gpu: 10 passed, 0 failed.Cost: up to 4 more published textures per dispatch in the programs below, counted from what their tables declare; not measured at run time. If a table lies outside the bound heap, the whole heap counts as written.
In ProjectScarlett: 9 recorded compute programs have the map, the bitmap and table image stores. I don't know yet which are dispatched or whether their targets are placed in title memory, so the effect on the picture is a guess. The game hasn't run with this.
Not fixed: heap image atomics set no bit either; I found none in recorded requests that carry the bitmap.
python tuxbox.py checkofbd8015d4(rebased ontoe5d2e913; main's reformat and one Miri-ignore marker on a test; range-diff in the PR's history): RTX 5090 (10de:2b85, 620.70.10) 202 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 201 pass, 0 fail. GE-Proton11-14.Not run: the game for a change in the picture. Integration builds with it reached the story's loading on an RTX 5090, and then ended in a different crash.
Evidence: TuxBox check of
bd8015d438, no uncommitted changes, GPU 10de:2b85: 16 passed, 0 failed, 0 not runEvidence: TuxBox check of
bd8015d438, no uncommitted changes, GPU 1002:13c0: 16 passed, 0 failed, 0 not run🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by Claudineijoseprill on 2026-11-30T03:17:51Z.
AMD discrete RDNA 1 run, on
0d219279: Radeon RX 5700 XT (1002:731f, RADV, Mesa 25.2.8, GE-Proton11-14, Ubuntu 24.04), fullpython tuxbox.py checkwith--proton,--prefixand--windows-dxc: 186 pass, 16 fail.Against unchanged
main(f482572a) on the same machine: 184 pass, the same 16 fail. The only difference is the two new gates,lanes-bindless-table-heap-store-wideand-constrained, which pass. No regressions.The 16 failures are all features this card or driver lacks, and fail the same on
main:lanes-selftest-ray-tracing-*,bvh64-query,bvh32-query: no ray tracing on RDNA 1lanes-mesh-*, themeshD3D12 control,translated-mesh: no mesh shaderspixel-interp(flatandhalfcases, pipelineE_INVALIDARG;smoothpasses): RADV doesn't exposeVK_KHR_fragment_shader_barycentricon this cardNot run: a game.
Evidence: TuxBox check of
0d219279c5, no uncommitted changes, GPU default adapter: 11 passed, 3 failed, 0 not runImported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:06Z.
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:31:59Z.
Merged into main as
539b8cb3(squashed and credited to you), thanks! The Lanes scenario failing on both vendors before the fix makes it easy to trust. On the squashed result, d3d12's unit tests pass under Wine (four more than before), and clippy, formatting and the Lanes Python tests are clean. Thanks also to @Claudineijoseprill for the RDNA 1 run.Pull request closed