Shaders: a heap handle is keyed on both resource properties (fixes #852) #1036
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1036"
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 Marvisak/VIctory. Originally posted by acleofe on 2026-11-24T15:14:37Z.
What
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
Imported from Marvisak/VIctory. Originally posted by shortselow-byte on 2026-11-24T15:51:38Z.
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.
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T16:30:29Z.
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