Repository navigation
d3d12: serialize depth-plane root signatures explicitly - #2591
Conversation
Wine can compile the depth-plane shader without embedding its RootSignature attribute. Serialize the matching v1.1 signature from the host parameter instead, and give the existing depth-plane GPU test an explicit signature for its readback draw.
|
The fork workflows are awaiting maintainer approval. I ran the full-tree No Game Data check locally on I also ran the Linux semantic suite with SPIRV-Tools required on both this PR and bare Combined Linux check with #2577. I merged AI-assisted with Codex. |
There was a problem hiding this comment.
Reviewed 5b3477768 against main 1bc055e6c. The explicit v1.1 signatures preserve the pixel-visible SRV at t0 for the two plane shaders and the one 32-bit constant at b0 for the fixture.
The exact PR's a_depth_planes_twin_is_drawn_into_the_plane passed on native Windows 10 22H2 (19045) with RTX 5070 (610.88), profile diag, MSVC target. For the A/B I made the two early returns in the draw fixture hard assertions in local copies, requiring a real host device and a depth twin. The draw/readback and depth-twin round-trip both passed on main and on the PR. This independently checks native D3D12 compatibility; the Wine regression is covered by the author's run. The pair with #2577 also merges cleanly in git merge-tree.
AI-assisted.
|
Native Windows regression check for Both revisions passed the depth-plane GPU readback, the stencil-plane GPU readback, and the depth/stencil footprint check (3/3 each). I used the same local fixture-only guard on both revisions to require native D3D12 device initialization. The device-initialized marker printed for both GPU tests on each revision before their readback assertions passed. This covers native Windows parity for the explicit root signature change. The Wine result is covered separately by the author's report. Synthetic textures. AI-assisted (Codex). |
|
RUN of #2591 (native Windows, no Wine, no game files) Heads: PR 5b34777 (base = main 1bc055e, so no merge needed). Command (in d3d12/, filters after the separator because cargo takes one name before it):
Not checked here: the real Wine / vkd3d-proton run (needs Linux). |
timbot103
left a comment
There was a problem hiding this comment.
Static audit of 5b3477768 against 48bae6cad. No findings.
The explicit v1.1 signatures match the depth shaders' pixel-visible t0 binding and the fixture's single b0 constant. The supplied results cover the R16 depth readback on Wine and native Windows. The float variant shares the same table layout and has no dedicated depth readback in the supplied tests.
AI-assisted.
|
Thanks for pointing out the missing float readback. I tested the public PR head The integer and float depth-plane readbacks, stencil-plane readback, and depth-twin round trip passed on both the RTX 4070 SUPER (NVIDIA 620.73.04) and Radeon 610M (RADV 26.3.1), under Wine 11.22 on CachyOS with VKD3D-Proton The fixture uses synthetic textures. The No Game Data scan of the two changed files and the diff check passed. AI-assisted with OpenAI Codex (GPT-6). |
|
RUN: PR #2591 re-run on current main (red/green) Heads: PR 5b34777, main 4364a4f. Merged locally with Command (d3d12/, MSVC target, vcvars64):
Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 (native D3D12). Not checked: Wine/vkd3d-proton. |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: D3D12-WINE-DEPTH-PLANE
What and why
Wine's HLSL compiler ignores the
RootSignatureattribute, so the depth-plane pass cannot create a root signature from the compiled pixel shader. The pass then leaves the depth plane untouched.Serialize a v1.1 root signature explicitly for both depth-plane shaders. The existing pixel-visible SRV at
t0retains its visibility and descriptor flags. The existing GPU regression test serializes its singleb0draw constant explicitly too, so it can exercise the original texture readback assertions under Wine.Tested
leonida-gpulibrary tests withcargo xwinin thediagprofile.a_depth_planes_twin_is_drawn_into_the_planefails on baremainat1bc055e6cwith zero descriptor heaps instead of one. It passes with this change, including the per-list heap and depth readback assertions.git diff --checkandscripts/check_no_game_data.py. It also applies cleanly on top of Linux: build leonida.exe and run it under Proton or Wine #2577 at32ae9bf82.main(4364a4fa6) with an RTX 3090, NVIDIA driver 621.40 and MSVC. All three focused checks passed. Restoring only the old production root signature reproduced the zero-descriptor-heap assertion. The full library suite reported 544 passed, 0 failed and 47 ignored on both trees. Retest by enlight3dGPUs tested: Desktop NVIDIA GeForce RTX 4070 SUPER (12 GiB, profile M), NVIDIA 620.73.04, CachyOS (kernel 7.3.6-3), Wine 11.22, vkd3d-proton
71cae091, DXVK DXGI 3.1.1.AI-assisted: Codex.
Checklist
mainat1bc055e6c.