Repository navigation
Conversation
…sample positions
The edge cases (TEST-848) compare MIN, MAX and AVERAGE over samples that differ
with the PC runtime on the layer's own adapter. On an RTX 4070 SUPER (NVIDIA
621.24, Windows 11) all 34 of them failed against the hardware reference while
matching WARP byte for byte. The reference was the one off: with NVIDIA's MFAA
("Enable sample interleaving") on in the driver's global profile, a D3D12 4x
target's default sample positions are not the standard pattern. Measured with a
D3D12-only program (no Vulkan): until the first Present the four samples of a
pixel coincide, so MIN, MAX and AVERAGE agree everywhere, and after each Present
two other patterns alternate. Vulkan on the same driver keeps the standard
locations, and so does the layer.
Where the device has programmable sample positions, the edge cases now set the
standard pattern before the clears and keep it through the resolve. The layer
and WARP report none and are unchanged. On that machine: 74 of 97 match on the
hardware (36 before), 71 of 71 on WARP, exit 0, also under
LEONIDA_VK_VALIDATION=1.
No game data. AI-assisted.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
Contributor
|
[KEEP]
|
4 tasks done
QemmHD
added a commit
that referenced
this pull request
Nov 25, 2026
…-fallback Merging. **Why merged** - Fixes the NVIDIA startup stop that #939 introduced. Slot 133 asks for a D16S8 (format 118) depth texture with unordered access. On NVIDIA, `pc_format()` maps it to D24S8 and the depth provider refuses UAV on that, so the boot died early. With this PR the refusal is logged once and the texture is made without UAV, i.e. the pre-#939 stand-in. - Independent real-boot confirmations past the stop, each against the same build without the PR stopping there: - RTX 4070 SUPER, Windows 11; - RTX 5060 Ti, Windows 10 (Snooozs); - RTX 3070 Ti, Wine 11.22 (djrolfes); - RTX 3080 Ti, Wine 11.17 (slauko: 603 s, no exception); - RTX 3090, Proton (azsekazvamdimitar). - On AMD (adrianmjim, RX 7900 XT) the native path is untouched and the related tests pass, including a GPU without D24S8 that falls back to D32S8. - Re-tested here merged onto 3de22a1 (after #1547) on an RTX 4070 SUPER, and the merge onto the current main (57ba40b, which only adds #1493's translator change) is also clean: - fresh RelWithDebInfo build; - full ctest 410/411, where the only failure is `d3d12_depth_resolve`, the known NVIDIA MFAA sample-position case fixed by #1505; - the PR's 16 related tests pass, also with `LEONIDA_VK_VALIDATION=1`; - the consistency set is the same as main. **Why it's good** - It's a narrow fallback, used only when the provider refuses. Consoles and GPUs that accept the format keep the native path. - It comes with tests for the refused and accepted cases. - It unblocks every NVIDIA tester at the same spot. **Known and separate:** the slot 133 stand-in leaks about 60 Vulkan objects at device teardown under validation. That leak predates this PR and is reported in #1608. Full D16S8 UAV semantics on NVIDIA remain a follow-up. AI-assisted (Claude Code, Claude Opus 5.5).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: TEST-DEPTH-RESOLVE-SAMPLE-POSITIONS (#14 (comment))
What and why
d3d12_depth_resolvefails its 34 edge cases (TEST-848) on an RTX 4070 SUPER (NVIDIA 621.24, Windows 11). The layer is not at fault: it matches WARP 71/71, and the analytic standard 4x pattern byte for byte. The host reference is what's off. This PC's NVIDIA global profile has "Enable sample interleaving" (MFAA) on, and with it a native D3D12 4x target's default sample positions are not the standard pattern:That was measured with a small D3D12-only program (no Vulkan, no Leonida). No PSO or resource setting changes it; only an explicit
SetSamplePositionswith the standard pattern does, and then the grid equals WARP. Vulkan on the same driver keeps the standard locations, and so does the layer.This PR makes the edge cases set the standard 4x positions where the device has programmable sample positions, before the clears and through the resolve. The layer and WARP report none, so their results are unchanged. This is probably also why #67 lists
d3d12_depth_resolveas a "known failure" on an RTX 5060 Ti.Tested
Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja, RelWithDebInfo:
d3d12_depth_resolveexits 0. On the NVIDIA host, 74 of 97 cases now match (36 before; the rest are the cases the test already marks as host-dependent). WARP matches 71/71. It passes four repeated runs and underLEONIDA_VK_VALIDATION=1with 0 validation errors, and in ctest.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md. (n/a: test-only)AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf