Shaders: image atomics on a handle of their own element type #1756
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!1756
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1756"
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?
@paulomatias97-create on GitHub · 2026-11-24 22:00 UTC · original
paulomatias97-create:shader/atomic64-u64-handle→main· +93 −3 · 2 files · 2 commits · openImage atomics run on a handle annotated with the wrong elements. The handle cache is keyed by the first word of the resource properties only, so an image atomic after the image's size query reuses that query's handle,
RWTexture2D<4xF32>. Separately, 64-bit atomics asked for U32 elements; DXC annotates a texture of 64-bit integers as U64.umax,cmpswapwithglc,swapof the returned value) that checks the module's 64-bit atomic features.Verified
dxc -dumpbinon the test's module: before, the atomics use aRWTexture2D<4xF32>handle; after,RWTexture2D<U64>. Both versions passdxv(DXC built from source), so the validator does not catch this.cargo test -p victory-shader: 119 passed.cargo clippy -p victory-shader --all-targets --all-features --target x86_64-pc-windows-msvc -- -D warningsis clean.Not verified
🤖 Generated with Claude Code
https://claude.ai/code/session_01CL4QZxTrzfn3nkthzLyAtV
@0xKaji on GitHub · 2026-11-24 22:14 UTC · original
Verified
ab3c38don Linux + Wine11.22+vkd3d-proton 3.2.0(GE-Proton11-14) + NVIDIA RTX 3060 8 GB (Ampere, driver620.73.04), cross-built withcargo xwin(x86_64-pc-windows-msvc,VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains).Tests
cargo test -p victory-shader --offline: 119 passed, 0 failed, 1 ignored.emit::tests::a_64_bit_image_atomic_is_a_64_bit_atomic --test-threads=1): 1 passed, 0 failed (0.00s).Live title A/B on
70564ae(diagbuild,VICTORY_D3D12_DRED=1)70564ae(baseline): crashed at+4 s(before frame 16) witherr:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call.70564ae+ PR #1756 (ab3c38d): 0vkCreateComputePipelinesexceptions; boots cleanly through menus into Stage (e) world rendering (frame=1024presented withdraws=5117 drawn=5117 dispatches=1116 dispatched=1116, reachingframe=1127at+55 sbefore hitting the 8 GB VRAM ceiling onvkAllocateMemory), 0 GPUXids.@Marvisak on GitHub · 2026-11-25 03:40 UTC · original · edited 2026-11-25 15:55 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-shader/src/emit/lower.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (merge candidate) was for an older state ofmain.Generated by Claude Code
@axknxla on GitHub · 2026-11-25 16:42 UTC · original
What
Thanks for the original fix. I prepared a local port of paulomatias97-create’s 32-bit cache-key commit onto upstream
67e8ae14. That base has block-local, entry-block, and control-flow join caches. The port includes both resource-property words in each key so a size query and an image atomic on the same descriptor get correctly typed handles.The synthetic tests adapt acleofe’s size-query/atomic fixture from #1036 and cover all three cache paths. The diff is below if it helps with rebasing #1756.
Tested
x86_64-pc-windows-gnullvmtest binary under GE-Proton 11-14. Reverting each cache-key change individually made its matching synthetic test fail.67e8ae14, passesgit diff --check, andcargo xtask policypassed. Verification covers synthetic compiler output. GPU execution and the separate 64-bit commit remain untested here.Codex assisted with the port, synthetic tests, and verification.
Source and synthetic test diff against
67e8ae14View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.