shader: lower buffer_atomic_sub as an add of the negated data (#363) #367
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!367
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-364"
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?
@tiagonogueiraa-bit on GitHub · 2026-11-27 14:13 UTC · original
tiagonogueiraa-bit:shader-buffer-atomic-sub→main· +77 −2 · 3 files · 1 commits · merged 2026-11-27 16:04 UTCRefs #366
Shape.
buffer_atomic_subwas refused by name, because DXIL'sAtomicBinOphas no subtraction.Change. In
Lower::bufferit is nowatomicBinOpadd (0) of0 - data, marked by theATOMIC_SUBsentinel. Modulo 2^32 the dword left is the same, and withglcthe value returned is the old one either way. Every other buffer atomic is unchanged.By-output corpus sweep. 12,020 containers from my own boot-to-menus run (Series S), native host options, main
905e7aaagainst this head:Gained:
49b8b58b93edb335,b1454a15c3e09497,dfc4a2c9e8be67ba.Test.
heap_tests::a_buffer_atomic_sub_leaves_the_difference_and_returns_the_old_value(victory-gpu, on Metal with MSC 4.0 beta 3). Lane 0 subtracts 3 from a raw UAV dword withglcand stores the returned value next to it:[7, 10];[0xfffffffe, 1].On main it fails at translation.
Checks.
cargo test -p victory-shader -p victory-hle -p victory -p victory-gpu -p victory-metal -p xtask: 955 passed, 0 failed, 10 ignored.-D warnings: clean.cargo xtask policy: ok.The 64-bit, image and global
_subforms are not covered, because no shader in the corpus uses them.docs/native-host.mdhas a short section on this. @Olima34, for the board.@LakshanSivakumar on GitHub · 2026-11-27 16:05 UTC · original
Merged in
be7dc1b5with the other shader PRs from tonight. Ran the tests (native arm64), Windows clippy, the policy check and a release build on the merged tree, and swept my full corpus of 21,600 shaders before and after: 0 lost, 352 newly translated, every changed output accounted for. I have not run the game on it yet. Thanks.