Shaders: a heap handle is keyed on both resource properties (fixes #852) #1036
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
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
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
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/Marvisak--VIctory!1036
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1036/head"
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?
@acleofe on GitHub · 2026-11-24 15:14 UTC · original
fix/shader-handle-key-both-props→main· +57 −2 · 2 files · 1 commits · closed without mergingWhat
The block-local cache of heap handles in
Lower::handleis keyed on both words of the resource properties, not only the first. A test-onlyheap_propslist (besidenonuniform_handles) records each heap handle's properties.Why
The key held
props.0(kind and UAV bit) but notprops.1(component type, or structure stride). In one block, an image size query or load on a UAV makes a handle annotated as a floatRWTexture2D<4xF32>(0x409); animage_atomic_*on the same descriptor afterwards asks for a 32-bit integer one (0x105) and got the cached float handle back. The atomic then runs on a float-annotated handle: dxil.dll accepts the module, but NVIDIA's compiler crashes on it (#852). A structured buffer read with two strides in one block had the same collision.Test
an_image_atomic_after_a_size_query_has_its_own_handle:image_get_resinfothenimage_atomic_addon one descriptor make two handles, float then integer. Before this change it made one.cargo clippy --workspace --all-targets [--all-features] --locked -- -D warningsandcargo test --workspace --lockedpass.Not run on an NVIDIA GPU. The shader cache keys on the build, so cached translations are redone.
🤖 Generated with Claude Code
@shortselow-byte on GitHub · 2026-11-24 15:51 UTC · original
This PR has no CI run yet, so I ran the CI's checks at head
8d898b1(onmainffe310e): Windows 11, Rust 1.98.1 MSVC, AMD Radeon RX 6900 XT (RDNA2).cargo test --workspace --locked -- --test-threads=1: 343 passed, 0 failed, includingan_image_atomic_after_a_size_query_has_its_own_handle(GPU tests on the AMD device and WARP).cargo clippy --workspace --all-targets --locked -- -D warnings, and with--all-features: clean.cargo xtask policy: ok.Not run on NVIDIA either, so the driver crash from #852 itself is still unchecked.
@Zipettte on GitHub · 2026-11-24 16:30 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
8d898b1:cargo test -p victory-shaderpasses, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Pull request closed