fix(shader/amd): emit dedicated non-uniform heap handle for buffer size queries (#276) #385
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!385
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Androtim on GitHub · 2026-12-03 11:25 UTC · original
Androtim:fix/amd-buffer-size-nonuniform-handle→main· +47 −2 · 3 files · 1 commits · merged 2026-12-03 12:01 UTCSummary
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
github-bot referenced this pull request2026-12-03 11:38:31 +00:00
@Androtim on GitHub · 2026-12-03 11:33 UTC · original
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.
@Androtim on GitHub · 2026-12-03 11:34 UTC · original
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!