fix(shader/amd): emit dedicated non-uniform heap handle for buffer size queries (#276) #385
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/385"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T11:25:43Z.
Summary
Fixes an AMD RDNA 4 (
RX 9070/RX 9060,amdxc64.dll+0x861b9f) shader compiler null-pointer crash insideCreateComputePipelineStatewhen a buffer's size query (dx.op.getDimensions) shares the same uniform heap handle as the buffer's loads.Adapted cleanly from GPL-3.0
KyleS98/VIctory-Neocommitb368b6d(originally ported fromtrustno1-coder/VIctory-NVIDIA66da8aaa,DexNom/VIctory#62, andfxceless/victory-fork#1213).Changes
crates/victory-shader/src/emit/lower/amd.rs(Lower::size_view_handle): emits a dedicated heap handle markednonuniform = truefor uniform buffer size queries (preservingraw_twinadjustment and keepingnonuniform_handlesunchanged since the index is uniform across lanes); images and waterfall loads continue usingself.handle(...).descriptor_dataincrates/victory-shader/src/emit/lower.rsto callself.size_view_handle(...).scalar_table_load_uses_the_base_index_and_computed_soffsetincrates/victory-shader/src/emit/lower_tests.rsto verify both the load handle and the size query handle resolve to the identical heap slot.Verification
cargo test -p victory-shader --lib scalar_table_load_uses_the_base_index_and_computed_soffsetcargo clippy -p victory-shader --all-targets -- -D warningscheck#282)Related: #276
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T11:33:10Z.
Read-only static audit of
85108133(CIcheckPASS): VERIFIED CLEAN (0[P0], 0[P1]).crates/victory-shader/src/emit/lower/amd.rs(size_view_handle): clean dedicated non-uniform handle for uniform buffergetDimensionsqueries, preservingraw_twinadjustment and keepingnonuniform_handlesunchanged; waterfall loads and images fall back toself.handle(...).victory-gpu/build.rsalready recursively hashescrates/victory-shader/src, so the new module automatically updatesVICTORY_TRANSLATOR.Holding auto-merge solely for Gate 3 live GPU smoke verification (since this touches DXIL emission). Once posted, ready to merge immediately.
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T11:34:28Z.
3-Gate Verification Summary (
8510813)check):PASS(6m34s)VERIFIED CLEAN (0 P0, 0 P1)PASS— translated1,015shaders and built191host PSOs with0DXIL validation or PSO compilation failures,0DRED,0device-removed, peak dedicated VRAM5524 / 6670 MiB, clean visuals (8.0–8.6 fps).Ready for merge!