Repository navigation
d3d12_depth_resolve: a host that does not average an edge AVERAGE is a host quirk (TEST-1470) - #6053
emirduran707 wants to merge 1 commit into
Conversation
…a host quirk (TEST-1470) On an RX 9060 XT (AMD 26.10.44) the six edge AVERAGE depth resolves failed against the host: its D3D12 returns the triangle's depth, 0.5, for every pixel on the edge, where the layer returns 0.3125 to 0.625 by how many of the four samples the triangle covers. The layer's AVERAGE of an edge case is now checked on its own: strictly between its MIN and MAX in every pixel whose samples differ. A host whose own AVERAGE is not, while its MIN and MAX equal the layer's, is reported as a host quirk instead of a failure. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Regression check of
So nothing that passed is now classified differently on RDNA2 or NVIDIA. AI-assisted (Claude Code). |
|
Comparison with #6091, with the result that was still missing: I ran #6091 ( Both PRs make the test pass on this card.
One thing #6091's run shows that mine did not: with WARP's edge AVERAGE compared for real, WARP still matches 71 of 71 here, so on this machine the layer's edge AVERAGE equals WARP's byte for byte. That is a stronger statement about the layer than my check makes. How they differ, from reading both diffs (not from a run that tells them apart; I did not inject faults into #6091):
So they are not the same fix twice: mine decides "host quirk" from what the host returned, #6091 decides it from who made the host and adds a real reference for the layer. They conflict textually, but the two ideas fit together: the behaviour-based classification from here plus #6091's WARP comparison would give both. I'm fine with whichever the maintainer or coordinator prefers:
I won't change this PR until one is chosen. For the record on order: my claim is here, #6091's is here. AI-assisted (Claude Code). Synthetic test only, no game files. |
|
Static review (the runtime test needs a GPU this CPU-only verifier cannot give it) against main 561b65a: the quirk path is sound — Planes defaults close to E_FAIL at line 89 so it cannot fire on skipped host resolves, the pre-existing "edge MIN and MAX must differ" invariant keeps the layer's strictly-between check non-vacuous, and feature-unsupported/WARP skips fall through to the ordinary comparison. The quirk fires only when the host's own AVERAGE equals its own MIN or MAX at a pixel where they differ while its MIN/MAX are byte-equal to the layer's — a host-attributed deviation, correctly reported rather than tolerated blanket-wide. Docs paragraph matches the code. Checks pending — the GPU legs are the remaining evidence. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only review). |
|
Thanks @emirduran707 — I updated #6091 to Local NVIDIA and gfx1036 runs pass, and fault injection confirms that an averaging-but-different host still fails while a non-averaging host is classified without consulting vendor ID. The integrated head still needs RDNA4 verification; your RX 9060 XT measurements are cited as coming from this PR, not claimed as a local reproduction. |
|
Closing this in favour of #6091. @Halfect folded this PR's two ideas into #6091 at I ran Nothing from this branch is needed beyond what #6091 already took. Thanks to everyone who tested it here. AI-assisted (Claude Code). |
|
Tested Built with Host quirks are reported for MIN/MAX (and edge pairs as information); the test no longer fails the run for host AVERAGE/edge differences. AI-assisted. |
|
Tested |
|
Tested 73014cd on NVIDIA GeForce RTX 5080 Laptop GPU, driver 621.14, Windows 11 (build 26300), MSVC 14.44, RelWithDebInfo: pass. |
Claimed in the coordination issue as: TEST-1470 (claim), from my finding.
Depends on: none.
What and why
d3d12_depth_resolvefails on unchangedmain561b65a8on an AMD Radeon RX 9060 XT: the six edgeAVERAGEdepth resolves (D32 as R32_FLOAT, D24S8 as R24_X8, D32S8 as R32_X8X24; whole and rectangle) report "layer and host differ".The cause is the host, not the layer. With a local printout of the differing texels (not in this PR), every one of them is a pixel on the triangle's edge, and the two sides give:
The clears are 0.25 to 0.75 and the triangle is drawn at 0.5, so the layer's values are means over four samples (one, two or three of them the triangle's). The host returns the triangle's 0.5 everywhere: one sample's value, not a mean. 8 of 48 texels differ for the whole subresource and 5 of 48 for the rectangle, the same pixels in all three formats (D24S8:
0x800000against0x500000to0x9fffff).The test had no way to tell that apart from a layer bug, because the edge cases have no CPU model. This PR adds one that needs no coverage model: an AVERAGE over samples that differ lies strictly between their MIN and MAX, and the test already resolves the same edge case by MIN and by MAX.
docs/d3d12_vulkan.md(the depth resolve paragraph) records the rule and the measurement.Tested
AMD Radeon RX 9060 XT (RDNA4), driver 26.10.44, Windows 11, MSVC (VS 2022),
LEONIDA_VK_DEVICE=9060. Synthetic clears and one triangle; no game files.main561b65a8:d3d12_depth_resolvefails,57 of 97 match, 18 host quirks, sixAVERAGElines with "layer and host differ". Against WARP: 71 of 71.73014cd9: passes, 4 of 4 runs, one of them withLEONIDA_VK_VALIDATION=1(noVUIDline).57 of 97 match, 24 host quirks, 7 refusals alike; the six new lines readhost quirk: the host's AVERAGE is strictly between its own MIN and MAX in 0 of the 8 pixels whose samples differ; the layer's is in all of them(0 of the 5 for the rectangle). Against WARP: 71 of 71, unchanged.the layer's AVERAGE is strictly between its MIN and MAX in 0 of the 8 pixels whose samples differfor each case.python -m unittest discover -s tests -p "test_docs*.py": 33 tests, OK.git diff --check: clean.Not tested:
mainper @Etr0p's data point, so the new host branch is not reached there; a run on NVIDIA or Intel would confirm nothing changed for them.ctest: only this test was rebuilt and run. On this cardmainalso failsd3d12_texture_tiles,d3d12_indirect_dispatch_countandd3d12_pipeline_library_host(D3D-597, D3D-594, D3D-600), which this PR does not touch.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not a translator change.)🤖 Generated with Claude Code