Shaders: lower 64-bit texture atomics to DXIL i64 atomics #1897
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1899"
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 TansuoTro on 2026-11-25T00:21:27Z.
Summary
Implements 64-bit image atomics (image_atomic_* with dmask=3, or xF for cmpswap), which previously stopped shader translation at
emit/lower.rs.dx.op.atomicBinOp.i64/dx.op.atomicCompareExchange.i64(opcodes 78/79) on the heap texture handle; supports add/sub/and/or/xor/smin/smax/umin/umax/swap/cmpswap, with glc returning the old 64-bit value via split registers.Uint64TextureUavtest view.dxil.dllwhen available (skips cleanly otherwise).Verification
cargo test --workspace -q: passcargo clippy --workspace --all-targets --locked -- -D warnings: passcargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passdxil.dllvalidation of all generated 64-bit/32-bit atomic shaders: passTested on Game
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T00:32:49Z.
Review: COMMENTED
Mixed PR: shader/formats parts are macOS-tested in the batch; GPU/HLE parts are Windows-only statics.
64-bit texture atomics lowered to DXIL i64 atomics: gpu+shader mixed — shader part tested in batch, DXIL emission Windows-only.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T00:26:51Z.
Heads-up from reading, not a run: this PR's base (
ffe310e) predates0b35b7fonmain, which already lowers 64-bit image atomics. TheR32G32_UINTview uses the low dword in R and the data as an i64.subis done as add of the negation. It setsflags::INT64 | ATOMIC64_TYPED | ATOMIC64_HEAP(emit/lower.rsaround line 7718), andvalu_tests.rshasimage_atomics_of_64_bits. GitHub reports this PR as conflicting withmainnow.If something here isn't in
main(theUint64TextureUavtest view, or an opmainrefuses), rebasing it down to that part would keep it reviewable.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T02:17:50Z.
Automated triage for the maintainers.
This pull request does not merge cleanly into
main. Conflicting files:crates/victory-gpu/src/descriptor/host.rs,crates/victory-shader/src/emit/host.rs,crates/victory-shader/src/emit/lower.rs,crates/victory-shader/src/emit/mod.rs,crates/victory-shader/src/emit/shader.rs,crates/victory-shader/src/emit/valu_tests.rs.It will be reviewed once it is rebased onto the current
main.Generated by Claude Code
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.