gpu: reuse vertex fetch shaders across readback references #2247
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2255"
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-25T08:04:01Z.
The vertex fetch suite recompiles a format’s vertex shader and compute readback wrapper for every deliberately incorrect CPU reference. Those runs change only the words in the case file. Compile each normal format once and reuse its compute binary while checking the different references. Each mutated shader is still compiled separately as both VS and CS. The 52 device invocations, mismatch checks and capability skip are retained.
On Windows, starting at
e94e14ff, I ran the full entry point with DXC 1.9 on WARP and a physical D3D12 adapter. For every device invocation I compared the SHA-256 of the compiled compute shader and the complete binary case file, in order, along with the exit status and first-word mismatch diagnostic. All 52 records matched between revisions on both adapters: 12 normal successes and 40 expected failures.The WARP median fell from 12.743 to 8.130 seconds (36%). Both devices executed the tests. Reproduce with
python -B tests/startup_vertex_fetch_formats_check.py <dxc> <offscreen_check> warpand again withhardware. The controls, stream-fetch translation, documentation links, bidi check andgit diff --checkpassed. This test-only change also merges cleanly with #2193 and #2006.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T08:11:17Z.
Review: COMMENTED
Review of head
a4fba55a69(test-only, tests/startup_vertex_fetch_formats_check.py).Findings: 0 P1, 0 P2.
word=N expected=assertion are the same.correct = expected(name)is hoisted and compared with the same values as before.Commands executed locally:
python3 tests/docs_links_check.py-> 428 links OKpython3 tests/bidi_controls_check.py-> no bidi controlsgit diff --check origin/main...HEAD-> cleanpython3 tests/startup_vertex_fetch_formats_check.py controls-> passed> 1to> 9; the controls check failed as expected, then reverted. The GPU path (readback) cannot run on Linux, so its mutation coverage is the in-test MUTATIONS/WRONG cases, exercised on Win2025.x2w_pipe.py win2025 2255 --scope direct --targets offscreen_check --regex startup_vertex_fetch_formats: Debug and Release /O2 each 100% passed (3/3: _warp, _hardware, _controls), [PASS].AI-assisted; commands listed were executed locally.