Skip to content

d3d12_depth_resolve: check refused resolves against a destination cleared in its own list (#6610 follow-up) - #7905

Open
optinium51-bot wants to merge 2 commits into
ItsNotRexed:mainfrom
optinium51-bot:fix/depth-resolve-refused-batch
Open

optinium51-bot wants to merge 2 commits into
ItsNotRexed:mainfrom
optinium51-bot:fix/depth-resolve-refused-batch

Conversation

@optinium51-bot

@optinium51-bot optinium51-bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Item: etty8080's finding on #7804 (#7804 (comment)), no ID yet.

What

#6610 makes ExecuteCommandLists refuse a whole batch that holds a list whose Close failed ("list 0 is invalid; refusing batch"). resolve_and_read still recorded the clears, the refused resolve and the readback copies in one list and executed it on the layer, so since #6610 none of it runs and every refused case reads a buffer nothing wrote: eight refused ... destination changed lines and exit 1 on main. The layer does not write the destination; the test never reads what the clears left.

How

A successful case still records the clears, the edge draw and the resolve in one list, on the layer as on the host (split only on failure since 630e9d8, from the review). When Close fails on the layer (run_invalid), the refused list is run between a list of the same clears and a list that reads the destination back, so "a refused resolve leaves the destination as it was" is still checked against the destination the clears left, for the refused cases and for the modes a device lacks. The host path is unchanged.

Tested

Windows 11 build 26200, MSVC 14.52 (VS 2026), NVIDIA GeForce RTX 3060 (driver 616.92), RelWithDebInfo + Ninja.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

…ared in its own list (ItsNotRexed#6610 follow-up)

ItsNotRexed#6610 makes ExecuteCommandLists refuse a whole batch that holds a list whose
Close failed. resolve_and_read still recorded the clears, the refused resolve
and the readback copies in one list and executed it on the layer, so since
ItsNotRexed#6610 none of it runs and every refused case reads a buffer nothing wrote:
eight "refused ... destination changed" lines and exit 1 on main.

On the layer, the clears (and the edge draw) now run in a list of their own
first. A list whose Close fails is still executed, and its destination is then
read back in a third list, so a refused resolve is still checked against the
destination the clears left. The host path is unchanged.

Tested on Windows 11 build 26200, MSVC 14.52 (VS 2026), RTX 3060 (NVIDIA
616.92). d3d12_depth_resolve: main 9b60c92 fails 8 of 8 runs; with this, 5 of
5 pass, with the same counts (RTX 3060: 27 of 51 match, 24 host quirks,
7 refusals alike; WARP: 37 of 37) and 12 refusals keeping the destination.
Full ctest: 236 of 237 pass; the remaining failure is d3d12_vulkan_device,
which ItsNotRexed#7125 fixes, and with ItsNotRexed#7125 merged both pass. Not run: the edge cases
(no glslangValidator at build time). No game data.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trick-ye

Copy link
Copy Markdown

Tested a986b7018 (based on main dde82f27e) on AMD Radeon RX 7800 XT (RDNA3), AMD 26.11.2 (Windows driver 32.0.32029.2010), Windows 11 26200: d3d12_depth_resolve fails on main here and passes on this head, 5 of 5 runs.

  • main dde82f27e: d3d12_depth_resolve fails in the suite (ctest -j 1), and d3d12_depth_resolve_test exits 1 in 3 of 3 direct runs. Each direct run prints 12 ExecuteCommandLists: list 0 is invalid; refusing batch lines and the same 8 refused ...: Close 0x80070057, destination changed lines (for example refused D24S8 depth AVERAGE rect 1 and refused D32S8 depth AVERAGE rect 0), and no summary line.
  • This head: 5 of 5 direct runs exit 0, with no destination changed line and the summary 134 host comparisons matched, 12 refusals kept the destination, 0 modes the device lacks were refused; 20 edge MIN/MAX pairs differ.
  • The host comparison lines are the same on main and on this head: against AMD Radeon RX 7800 XT: 63 of 97 match, 18 host quirks, 7 refusals alike and against WARP: 71 of 71 match, 0 host quirks, 7 refusals alike.
  • Only d3d12_depth_resolve_test was rebuilt and run on this head (the PR changes only that file); it compiled with no compiler warnings. The rest of the suite was not run on it.
  • MSVC 14.42 (VS 2022), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RelWithDebInfo, LEONIDA_VK_DEVICE=7800. Synthetic test only, no game files.

AI-assisted (Claude Code).

@lohant27-netizen

Copy link
Copy Markdown

Tested a986b7018 (test file applied on main 77fa308f9) on Windows 11 (10.0.26300), NVIDIA GeForce RTX 5070 (driver 32.0.16.2101), MSVC with SDK 10.0.26100, Release: pass.

  • Without this change, d3d12_depth_resolve fails on main since d3d12: reject null arrays and invalid lists in ExecuteCommandLists #6610 (4da716493, found by building just before and after it): 8 refused cases report destination changed, because ExecuteCommandLists now refuses a list whose Close failed, so the old readback in that list never runs.
  • With it: exit 0. 97 of 97 match against the RTX 5070, 71 of 71 against WARP, 12 refusals kept the destination.

Note: #7930 fixes the same test the same way and also passes here, so one of the two can probably be closed.

@nicoco23

Copy link
Copy Markdown

Independent run, Windows 11, NVIDIA GeForce RTX 5070:

@RAINighty

Copy link
Copy Markdown

Tested a986b7018 merged with main dde82f27e (clean merge) on Windows 11 (10.0.26300), hybrid laptop: NVIDIA GeForce RTX 5060 Laptop GPU (driver 32.0.16.2124) plus Intel UHD Graphics, MSVC 19.44.35228, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, Ninja, RelWithDebInfo: pass, and it fixes a failure on main.

AI-assisted (Claude Code).

@MartinIndra02

Copy link
Copy Markdown

Independent build + test: PASS (one coverage note)

AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo, NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124 (Vulkan layer and host D3D12), plus WARP.

Head a986b7018, based on current main (dde82f27e). Built d3d12_depth_resolve_test.

Build d3d12_depth_resolve_test.exe
main dde82f27e exit 1, 8 lines like refused D24S8 depth AVERAGE rect 1: Close 0x80070057, destination changed
this PR exit 0 on 3 of 3 runs: 145 host comparisons matched, 12 refusals kept the destination, 0 modes the device lacks were refused; 20 edge MIN/MAX pairs differ. RTX 3080 74/97 (15 host quirks), WARP 71/71, 7 refusals alike on each

Coverage note: with run_invalid (every Vulkan-layer case, not just the refused ones), the clears and the edge draw are now closed and submitted in their own list before the resolve list is recorded (if (run_invalid) { list->Close(); submit(); restart(); }). So on the layer, the successful cases no longer check clear → draw → resolve inside one command list, which is the order the host path (and the old test) uses. If that same-list ordering matters (render-pass / barrier tracking in the replay), it might be worth splitting only when the resolve is expected to be refused. #7909 takes that approach: the split happens only after Close fails.

FYI: #7909 and #7930 make the same test fix in different ways. Each one on its own makes this test pass here.

@Maraco91

Copy link
Copy Markdown

Tested a986b701 (its base is main dde82f27) on NVIDIA GeForce RTX 3080 Ti, driver 616.56, Windows 11 26200, MSVC 19.42 + Ninja via scripts\build_runtime.ps1, RelWithDebInfo, Vulkan SDK 1.4.363.0: pass, and it fixes a failure this card has on main. An NVIDIA point next to the RX 7800 XT one above.

ctest -R "^d3d12_depth_resolve$":

tree result
main 6664b0db (before #6610) passed, without and with LEONIDA_VK_VALIDATION=1
main dde82f27 failed: 8 lines refused <case>: Close 0x80070057, destination changed (D24S8 and D32S8, depth and stencil, AVERAGE/MIN/MAX), then 57 of 97 match, 24 host quirks, 7 refusals alike against the GPU and 71 of 71 match against WARP
this PR passed, 1 of 1 without validation and 3 of 3 with LEONIDA_VK_VALIDATION=1

Only runtime/test/d3d12_depth_resolve_test.cpp changes, and the rebuild from the dde82f27 build touched that one test (18 s). I did not run the rest of the suite on this tree alone; a full run of this PR together with five other open fixes is in progress and I will add its result if it shows anything about this test.

AI-assisted (Claude Code); no game files.

From the review on ItsNotRexed#7905: a successful case on the layer again records the
clears, the edge draw and the resolve in one list, as the host path does.
Only a list whose Close failed is run between a list of the same clears and
a list that reads the destination back, so the lacking-mode path stays
covered.

Tested on an RTX 3060 (NVIDIA 616.92) with MSVC 14.52: d3d12_depth_resolve
passes 5 of 5 runs with the same counts; full ctest 236 of 237 (the other
failure is d3d12_vulkan_device, fixed by ItsNotRexed#7125). No game data.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@optinium51-bot

Copy link
Copy Markdown
Author

Thanks @MartinIndra02, done in 630e9d8: the lists are split only when Close fails. A successful case on the layer records the clears, the edge draw and the resolve in one list again, as on the host; a refused list runs between a list of the same clears and a list that reads the destination back, so the lacking-mode path stays covered. RTX 3060 (NVIDIA 616.92), MSVC 14.52: d3d12_depth_resolve 5/5 with the same counts; full ctest 236/237 (the other failure is d3d12_vulkan_device, #7125). Thanks also to everyone who tested it on AMD and NVIDIA. AI-assisted (Claude Code).

@justrealyme

Copy link
Copy Markdown

Tested 630e9d8 on NVIDIA GeForce RTX 5070 Ti (Blackwell), driver 617.42, Windows 11 build 26300, VS 2022 Build Tools (MSVC 19.44), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RelWithDebInfo: pass, and it fixes the failure main has on this card.

  • main dde82f27e: d3d12_depth_resolve_test exits 1 on every run (3 of 3 here), with 5 to 8 different refused ...: Close 0x80070057, destination changed lines each run.
  • This head: 5 of 5 direct runs exit 0 with no destination changed line: against NVIDIA GeForce RTX 5070 Ti: 97 of 97 match, 0 host quirks, 7 refusals alike, against WARP: 71 of 71 match, summary 168 host comparisons matched, 12 refusals kept the destination, 0 modes the device lacks were refused; 20 edge MIN/MAX pairs differ (edge cases on: glslangValidator present).

I'm closing my #7909 as a duplicate of this one (same fix, opened 24 s later); its AMD RX 7800 XT result from another tester is in #7909, for the same root cause.

Synthetic test only, no game files. AI-assisted (Claude Code).

@Maraco91

Copy link
Copy Markdown

Re-check of the new head 630e9d80 on the same machine (RTX 3080 Ti, driver 616.56, Windows 11 26200, MSVC 19.42 + Ninja, RelWithDebInfo): pass.

Not rerun: the full suite at 630e9d80.

AI-assisted (Claude Code); no game files.

@DeSunShine

Copy link
Copy Markdown
Contributor

Tested 630e9d80f merged into main dde82f27e on NVIDIA GeForce RTX 4090 (driver 621.24), Windows 11 Pro 26200, MSVC (VS Build Tools 18) + Ninja, Vulkan SDK 1.4.363: pass, and it fixes d3d12_depth_resolve on main here. d3d12_depth_resolve_test.exe 3/3 rc 0, "145 host comparisons matched, 12 refusals kept the destination". ctest -R ^d3d12_depth_resolve$ with LEONIDA_VK_VALIDATION=1 passes. Main alone fails with 8 × destination changed, and I bisected that to #6610 (4da716493). I'm closing my duplicate #7985 in favour of this one. AI-assisted (Claude Code).

@naxhh

naxhh commented Nov 23, 2026

Copy link
Copy Markdown

Tested merged onto main 867d922 (Windows 11, RTX 5090, driver 32.0.16.1088): d3d12_depth_resolve fails on main and passes with this PR. AI-assisted test run.

@sergiocr06

Copy link
Copy Markdown

Tested 630e9d8 on NVIDIA GeForce RTX 5060 Laptop GPU (driver 32.0.16.1047), Windows 11 Pro 10.0.26300, MSVC 14.44, Vulkan SDK 1.4.363.0: pass.

  • main (867d922), d3d12_depth_resolve_test: exit 1. The host comparisons all match (97/97 against the RTX 5060, 71/71 against WARP), but the refused resolves report Close 0x80070057, destination changed (D24S8 stencil as R24_X8 MIN, D32S8 depth/stencil AVERAGE, D32S8 stencil as R32_X8X24 MAX).
  • At the head: exit 0, 168 host comparisons matched, 12 refusals kept the destination, 0 modes the device lacks were refused; 20 edge MIN/MAX pairs differ.
  • Built with cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo, target d3d12_depth_resolve_test only.

#7905 and #7930 both fix this on this GPU with identical output.

AI-assisted (Claude Code).

@Cryptoteep

Copy link
Copy Markdown

Tested 630e9d80 on NVIDIA GeForce RTX 5060 (Blackwell, desktop 8 GB VRAM, driver 616.56, Vulkan 1.4.312), Windows 11 x64, MSVC 19.44 / Ninja RelWithDebInfo: PASS.

  • On main, d3d12_depth_resolve_test.exe fails with exit 1 and 8 × refused … Close 0x80070057, destination changed.
  • With commit 630e9d80, d3d12_depth_resolve_test.exe exits 0 with no failures:
    • depth/stencil resolves against NVIDIA GeForce RTX 5060: 51 of 51 match, 0 host quirks, 7 refusals alike
    • depth/stencil resolves against WARP: 37 of 37 match, 0 host quirks, 7 refusals alike
    • depth/stencil resolves: 88 host comparisons matched, 12 refusals kept the destination, 0 modes the device lacks were refused; 0 edge MIN/MAX pairs differ

Synthetic inputs only, no game data.

@lucasserafin94

Copy link
Copy Markdown

Tested 630e9d8 merged onto main 2a3b3b5 (Windows 11, one laptop with two GPUs: RTX 5090 Laptop (Blackwell, NVIDIA 621.35) and Intel Arrow Lake-HX iGPU (Xe-LPG, Intel 101.9175); MSVC 14.44, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, built with scripts/build_runtime.ps1): pass.

ctest -R '^d3d12_depth_resolve$': passed with LEONIDA_VK_DEVICE=5090 and =intel. On main it fails on both: 8 refused D24S8/D32S8 cases report destination changed, because since #6610 ExecuteCommandLists refuses the whole invalid list, so the readback copy recorded in it never runs and the stencil reads 0x00 instead of 0x5a.

#7930 and #8415 fix the same test and also pass here; only one is needed.

AI-assisted (Claude Code); no game files involved.

@BeetjeMatig

Copy link
Copy Markdown

Tested 630e9d8 on RTX 5070 Ti (Blackwell, subgroup 32), NVIDIA 621.01, Windows 11, MSVC 14.44 (VS 2022 17.14 Build Tools), CMake 4.5.1 + Ninja, Vulkan headers sdk-1.4.363.0 (fetched), SPIRV-Tools 2026.4, no game copy: pass.

I applied the diff (runtime/test/d3d12_depth_resolve_test.cpp) to a build of main at dfe4e4a, rebuilt only d3d12_depth_resolve_test and ran it. On main the test fails here with the eight refused resolves reporting "Close 0x80070057, destination changed" (D24S8 depth AVERAGE rect 1, D24S8 stencil AVERAGE rect 0, and six more), the same list as #8720. With this PR it exits 0: 51 of 51 resolves match the host on the RTX 5070 Ti with 0 host quirks and 7 refusals alike, 37 of 37 match against WARP, and the summary line reads "88 host comparisons matched, 12 refusals kept the destination, 0 edge MIN/MAX pairs differ". The edge cases were skipped because glslangValidator was not available at build time.

I also ran #7930 and #8828 the same way and they give the same result here, so all three fix the same failure; it is worth picking one and closing the others.

AI-assisted (Claude Code): built and ran the test as described above. No game data was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.