tests: report each split sampler mismatch and detect omitted stores #2398
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2406"
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 R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T15:30:30Z.
Refs #1115. The strict translated sampler fixture now names the plain or renamed table, reports the index and bits of every mismatching word over all three swaps, and returns failure if any readback differs. An earlier failure also survives a later capability skip.
The previous fixture accepted a shader that omitted both comparison stores during swap 1. Both expected values carried over from swap 0. The readback now fills the UAV with four distinct sentinels before each dispatch. The new negative control must report exactly words 2 and 3 in swap 1, with bits
c0400000andc0800000, and still examine swap 2. I verified that the old renderer returned success for that shader on all three local adapters.Intel's readbacks were
0.25 0.25 0 0,0.75 0.75 0 0, and0.25 0.25 1 1for swaps 0, 1, and 2. The missing-store control detected both unwritten words on Intel, NVIDIA and WARP. Local translated programs used DXC 1.9.2609.5, project-pinned SPIRV-Tools and patched SPIRV-Cross. The embedded direct controls reported DXC 1.9.2602.17. The local debug layer was unavailable.Windows Server 2025 WARP validation passed both registered CTests, with the debug layer enabled and both absent writes detected. The checked renderer is from
c601e6e9. Subsequent commits add the measured hardware results to the docs and clarify the Python summary. I reran the final driver on all three local adapters. The two existing direct index control binaries compiled byte-for-byte identically before and after the HLSL edit with DXC 1.9.2609.5.Reproduce with the pinned SPIR-V tools configured:
AI assistance: Codex + GPT-6.2 Astra (xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-25T15:57:01Z.
APPROVED: Focused fix reporting per-split sampler mismatches and detecting omitted store operations. Clear test-driven approach. No game files added.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T16:08:27Z.
Review: COMMENTED
Review of head
2eda1777(tests only:sampler.py,sampler_readback.cpp,sampler_index_control.hlsl,docs/experiments.md).What I checked:
OMIT_STORES_ON_ORDINARY_SWAPinsampler_index_control.hlsl, run fromcheck_missing_storesinsampler.py) asserts exact exit code, exactly words 2 and 3 of swap 1 with the sentinel bits, and the mismatch message. It is a real D3D12 readback, not a string check, and a skip (exit 77) is propagated.No blocking findings. Next: update with main, CI, Win2025 WARP dev+release.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T16:17:17Z.
Win2025 WARP receipt for head
2eda1777after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
2eda17771b79e803e6c0dd95ed402ac2fd5dd1bc:--preset dev):cmake --build --preset dev -- -j 2):4.60s(configure0.00s)ctest --preset dev -R 'spirv_sampler_views_warp' --parallel 6 --no-tests=error --output-on-failure): 1/1 passed (0.93s:spirv_sampler_views_warp0.82s)/O2(--preset release):cmake --build --preset release -- -j 2):3.63s(configure0.00s)ctest --preset release -R 'spirv_sampler_views_warp' --parallel 6 --no-tests=error --output-on-failure): 1/1 passed (0.76s:spirv_sampler_views_warp0.67s)sccache: 2/6 hits; wall16.1sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T16:21:48Z.
@tedin7 I checked the reviewed head
2eda1777against upstreammainat7092683a. It contains that main commit, and all three upstream CI jobs passed.I also rebuilt
offscreen_checkfrom this exact head with the stock dev (Debug) and release presets on Windows Server 2025. Both WARP CTests passed in each build with the D3D12 debug layer enabled. Both translated tables produced all three expected swaps, the two direct index controls matched, and the omitted-store control reported exactly words 2 and 3 of swap 1 withc0400000andc0800000.Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T17:25:46Z.
Review: APPROVED
Approved at head
2eda1777. The change is test fixtures and docs:tests/spirv_window/sampler_readback.cpp,sampler.py,tests/sampler_index_control.hlslanddocs/experiments.md. This adds an AMD adapter to the author's Intel, NVIDIA and WARP table, plus a negative control on the renderer change.Environment
--preset dev,offscreen_checkbuilt at2eda1777.tools/setup-spirv-tools.ps1, and DXC 1.8.2502.11 from SDK 10.0.26100.Normal run
0.25 0.75/0.75 0.25/0.25 0.75, comparison0 1/0 1/1 0. That is the RTX 4060 and WARP row of the table, not the UHD 770 one.sampler swap 1 word 2: expected=00000000 actual=c0400000andword 3: expected=3f800000 actual=c0800000.Negative control on the renderer change
I restored
tests/spirv_window/sampler_readback.cppto the merge base7092683a, which has no sentinel fill, kept the PR'ssampler.py, and rebuiltoffscreen_check:spirv_sampler_views_hardwarefails:AssertionError: missing comparison stores: exit 0. The old renderer accepts the shader that omits both comparison stores, which is the false pass the description reports.Merge checks: the branch merges cleanly with current
main. Required CI passed at this head. The/O2and coverage skips come from explicit workflow conditions. There are no review threads.AI-assisted; commands listed were executed locally.