compile_dxil: read shader requests at revision 28 #2939
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2939"
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 Miffedrandir on 2026-11-26T22:22:03Z.
Problem
The runtime (
d3d12_draw.inl) andgfx2hlsl.pykey shader requests withx2w-startup-shader-28andx2w-startup-shader-28cs.read_graphics_requestandread_compute_requestinsrc/shader_compute_request.cppstill hash with-14and-14cs. Socompile_dxilrefuses every request the current runtime writes, with "graphics request key mismatch or missing root" or "compute request key mismatch".Change
src/shader_compute_request.cpp: hash requests with the runtime's tags,-28and-28cs.tests/native_compute_clear_check.pyandtests/native_direct_container_check.py: publish their requests with the same tags.That's 4 lines in total, with no other behavior change.
Result
I ran
compile_dxil --jobs 8 <profile> --requests <cache> <out>over a shader cache written by the current runtime, counting only requests at revision 28:gfx1013-container-pair), 576 requestsgfx1013-direct-cs@0), 2,834 requestsTop frontend refusals after the fix:
Tests
Windows 11 26200, MSVC 19.44, release preset, RTX 5070 Laptop:
31 of 32 passed, and 1 was skipped (
native_comparison_pso_warp).native_scalar_lds_hardwarefails with "native compute PSO creation failed". It fails the same way one97c5c7cwithout this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01Sir6Mr49SZWax95VApRPvz
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T22:38:18Z.
Review: APPROVED
Review of head
6bd7803foncpp-migratione97c5c7c. Approving and merging.Diff: it changes exactly the four places that still used revision 14: both reader tags in
src/shader_compute_request.cpp, and the two test publishers.git grep 'x2w-startup-shader-14'finds nothing else.Real runtime cache, counts only: a copy of a cache written by the current runtime (2,747
.c67compute requests and 628 graphics.arequests, no.psin), run withcompile_dxil --jobs 8 <profile> --requests, release build, Windows 11 26300.9974:e97c5c7cgfx1013-direct-cs@0compute request key mismatchgfx1013-container-pairgraphics request key mismatch or missing rootThe top refusals after the change are
unsupported DPP lane selection(711),direct resource-heap load requires the selected GPU slot and its view type(334) and, for graphics,raw graphics requires a verified stage interface or wave state(608). That is the same picture you report.Fixtures:
ctest --preset release --no-tests=error -R '^native_'on an AMD Radeon RX 9070 XT (driver 32.0.32029.2010) gives 32 tests, 31 passed and 1 skipped (77,native_comparison_pso_warp).native_scalar_lds_hardwarepasses here, so itsnative compute PSO creation failedon your RTX 5070 Laptop looks specific to that adapter or driver, and is worth its own issue.Still open in #2933 (this PR does not claim it):
.psin:read_graphics_requeststill reads at most 12 bytes and hashes them raw, while the runtime path uses the ASCIIpsin1 <key> ena=… addr=…line andgfx2hlsl.pipeline_keyhashesb'psin1' + <II masks>. A request with a.psinfile is therefore refused as oversized rather than read. That is safe, but not yet aligned.<key>.txtmanifest the runtime loads.No CI runs for this base.
AI-assisted; the commands above were run locally.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T22:46:42Z.
Hardware and WARP result for head
6bd7803f8cac32bb681b3017251e23992ef30672(basee97c5c7c). The revision-28 request tests pass. A synthetic revision-14 compute request is still refused with "compute request key mismatch".Environment: Windows 11 25H2 (26200), Windows SDK 10.0.26100 DXC, NVIDIA GeForce RTX 4070 Ti, driver 32.0.16.2135, Microsoft WARP (4-lane waves). Clean worktree at the PR head, fresh
out/pe-env,devpreset. Tests run serially. No game cache or title files were used; the requests came from the repo fixtures and one synthetic control with the same layout.Commands
Result (measured, 2 runs, same outcomes): 5 tests: 4 passed, 1 skipped, 0 failed. ctest exit 0 both times (15.33 s and 14.71 s).
native_compute_clearnative_direct_containernative_comparison_pso_warpcompute requires wave32: WaveOps=1 range=4..4native_graphics_comparison_pso_warpnative_rectangle_pso_warprequests=1 compiled=1 refused=0Wider check, once:
ctest --preset dev --no-tests=error -R "^native_" --output-on-failure -j 1 --timeout 300on this head: 32 tests, 31 passed, 1 skipped (native_comparison_pso_warp), 0 failed. ctest exit 0. Total 65.05 s.native_wave_request_hardwarepassed (8.33 s). That is the test that failed at40365770in #2915; the currentcpp-migrationbase already includes #2928.native_scalar_lds_hardwarealso passed here (2.63 s). Nothing else in the^native_set failed or skipped.Control: Against this head's
compile_dxil, a synthetic compute request hashed asx2w-startup-shader-14cs(same source-built payload asnative_compute_clear, no title cache) was refused, exit 1:The same payload hashed as
x2w-startup-shader-28cswas accepted and compiled, exit 0.native_compute_clearalso has its own tamper control, which passed in both runs: after the revision-28 files are published, a damaged.datasection is refused with "key mismatch".AI-Assisted