Shaders: a 64-bit texture add carries out of the low dword #3135
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!3135
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3135"
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?
@FoxxoOwO on GitHub · 2026-11-26 09:42 UTC · original
FoxxoOwO:shader/wide-image-atomic-add-test→main· +52 −0 · 1 files · 1 commits · openSplit out of #2241 as its triage asked: the lowering that PR described is already on
main(commit0b35b7f), andimage_atomics_of_64_bitsalready covers umax, swap and cmpswap. What that test does not cover is an add: the R32G32 view's two dwords are one i64, so the adds every lane makes to one texel carry into the high dword instead of wrapping in place the way two separate 32-bit atomics would.image_atomicandlower_cs32helpers, not new ones.cargo test -p victory-shader wide_image_atomic_addpasses on both.#2241 can be closed.
@smaxxey on GitHub · 2026-11-26 10:02 UTC · original
Ran this on an RTX 4060 Laptop GPU (Ada, driver 32.0.16.1742), Windows 11 26300, Rust 1.98.1. No game files. Head
9e22db3merged locally ontomain63bcca4, thencargo test -p victory-shader --lib --locked -- --test-threads=1 --nocapture image_atomic, three runs.wide_image_atomic_add: ok in 3 of 3, on the hardware device and on WARP (no "skipped" line, so the hardware path ran and this card takes the 64-bit typed atomics in the heap).image_atomics_of_64_bits: ok in 3 of 3.The test does tell a carry from a wrap: the expected texel is
[0xFFFFFBE0, 63], so an add that wrapped within the low dword would leave the high dword at 0 and fail.Tested with Claude Code's help.
@Dukestar69 on GitHub · 2026-11-26 12:31 UTC · original · approved these changes
Verified on RTX 5090 & WARP against
origin/main(63bcca4):cargo test -p victory-shader --lib image_atomic -- --test-threads=1: 2/2 passed on RTX 5090 and WARP (includingwide_image_atomic_add).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Clean synthetic GPU test verifying 64-bit texture atomic add carry-out from the low dword.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.