Repository navigation
dxil: emit MSAA textureLoad before getDimensions to avoid amdxc64 crash - #1900
Conversation
Hardware test report — commit
|
|
NVIDIA counterpart to the RX 9070 XT run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, AI-assisted (Claude Code). Synthetic tests only. |
Brings main to parity with upstream/main (20cf130): - xcl-dev#1900: DXIL emits MSAA textureLoad before getDimensions to avoid amdxc64 crash Assisted-by: Antigravity (Gemini 4)
Keeps xcl-dev#1900's ordering: the sample count is read in its own block and the clamped loads start a new block, so no textureLoad follows getDimensions in one basic block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-dev#1947) The translated cache's identity covers the HLSL path's sources (XCL_TRANSLATOR_SOURCE_ID), but of gpu/dxil only TRANSLATOR_VERSION, which is bumped by hand. Two changes that bump it to the same number, or one that does not bump it (xcl-dev#1900), leave containers of the old translator in use. build.rs hashes every .rs file of gpu/dxil but the *tests.rs ones into XCL_DIRECT_DXIL_SOURCE_ID, which only the direct entries' identity includes (and the per-lane entries', which extend it). The HLSL path's entries keep theirs, as with bfb8133 for the per-lane sources. The directory is listed rather than named file by file, so that a new file is not left out. TRANSLATOR_VERSION stays, for changes of pso.rs's direct_compute / direct_graphics; edits of gpu/dxil no longer need it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pulls in xcl-dev#1836 (graphics and two-pass PSO disk cache + lazy MS/GS + shader build coalescing), xcl-dev#1930 (DXIL CSE across discard), xcl-dev#1900, xcl-dev#1005, xcl-dev#1053, xcl-dev#1864, xcl-dev#1866, xcl-dev#1869, xcl-dev#1876, and xcl-dev#1898 while keeping our RDNA4 MSAA clamp (xcl-dev#1908), wave64 graphics Direct DXIL guard (xcl-dev#1913), atomic writable-range tracking, static-sampler cache keys, and 4M-group indirect dispatch clamp.
The translated cache's identity covers the HLSL path's sources (XCL_TRANSLATOR_SOURCE_ID), but of gpu/dxil only TRANSLATOR_VERSION, which is bumped by hand. Two changes that bump it to the same number, or one that does not bump it (#1900), leave containers of the old translator in use. build.rs hashes every .rs file of gpu/dxil but the *tests.rs ones into XCL_DIRECT_DXIL_SOURCE_ID, which only the direct entries' identity includes (and the per-lane entries', which extend it). The HLSL path's entries keep theirs, as with bfb8133 for the per-lane sources. The directory is listed rather than named file by file, so that a new file is not left out. TRANSLATOR_VERSION stays, for changes of pso.rs's direct_compute / direct_graphics; edits of gpu/dxil no longer need it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Fixes the
amdxc64.dllnull-pointer dereference (0xc0000005at+0x85f80fonamdxc64.dll 32.0.32015.2008) duringCreateComputePipelineStateon dynamically indexed descriptor-heapTexture2DMS/Texture2DMSArrayshaders introduced in #1679 (gpu_direct_msaa_image_loads).Follow-up to #1679.
What is in it
CreateComputePipelineStatewhendx.op.getDimensionsprecedesdx.op.textureLoadon a dynamically indexed descriptor-heapTexture2DMS/Texture2DMSArrayinside the same basic block (reproduced even on DXC 1.8 HLSL, withnonUniformIndex=false,WaveSize(32), or separatecreateHandleFromHeap/annotateHandlecalls; does not crash whentextureLoadprecedesgetDimensionsin the same block, when they are in different blocks, or when the heap index is constant).crates/xcl/src/gpu/dxil/lower_image.rs(mimg_msaa): emit alltexture_load_samplecalls beforeget_dimensions(tex.handle, None)inside each guarded format branch (+6/-2, zero extra blocks or branches).crates/xcl/src/gpu/dxil/msaa_tests.rs: add CPU DXIL disassembly regression testdirect_msaa_loads_precede_get_dimensionsverifyingdx.op.textureLoadprecedesdx.op.getDimensionsin every generated MSAA load basic block.Tested
amdxc64.dll 32.0.32015.2008), Windows 11 x64 (10.0.22631.0),rustc 1.99.1 (58cf8f9c3 2026-10-13), rebased onto689f2db.cargo test -p xcl --lib gpu::dxil::msaa_tests -- --ignored --include-ignored(live RX 9070 XT GPU + CPU): 5 passed, 0 failed (0.15 s), includinggpu_direct_msaa_image_loads(previously0xc0000005),msaa_texture_ops_run, anddirect_msaa_loads_precede_get_dimensions.cargo check --workspace --tests: passed.Regression run
main:
PR:
Not tested
scripts/smoke.ps1withXCL_DIRECT_DXIL=1enabled, fullcargo test --workspacerun on425b869, NVIDIA and Intel GPUs, wave32-only adapters, and Linux/Wine/vkd3d-proton.AI use