mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #251] rdna2spirv: add --int64-atomics option for 64-bit OpAtomicExchange on *_atomic_swap_x2 (SHADER-868) #304
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#304
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/251
Author: @kotekompotek
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:work/shader-868-atomic-swap-x2📝 Commits (1)
2d0a082rdna2spirv: add --int64-atomics option for 64-bit OpAtomicExchange on *_atomic_swap_x2 (SHADER-868)📊 Changes
12 files changed (+639 additions, -32 deletions)
View changed files
📝
docs/design.md(+2 -2)📝
make_game.py(+5 -1)📝
runtime/shims/d3d12_com.h(+3 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+2 -0)📝
runtime/test/d3d12_vulkan_device_test.cpp(+1 -0)📝
runtime/test/shaders/build.py(+21 -1)📝
runtime/test/shaders/check.py(+3 -1)➕
runtime/test/shaders/cs_atomic_swap_x2_int64.asm(+172 -0)📝
scripts/run_gpu_tests.py(+35 -2)➕
tests/semantic/fixtures/disasm/cs_atomic_swap_x2_int64.s(+163 -0)➕
tests/semantic/test_atomic_swap_x2_int64.py(+173 -0)📝
tools/rdna2spirv.py(+59 -25)📄 Description
Claimed in the coordination issue as: SHADER-868 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)
What and why
ds_wrxchg_rtn_b64is untouched).--int64-atomicsflag forwarding inmake_game.py(FALLBACK_FLAGSand CLI parser) alongsidetools/rdna2spirv.pyandruntime/test/shaders/build.py(LEONIDA_INT64_ATOMICS=1).Global atomicsandbuffer_atomic_{and,or,xor,swap}_x2rows indocs/design.mdto document opt-in--int64-atomicsvs the default 32-bit dword-pair approximation.runtime/test/shaders/cs_atomic_swap_x2_int64.asm, registered it inruntime/test/shaders/check.py,scripts/run_gpu_tests.py, andtests/semantic/regen_fixtures.py(tests/semantic/fixtures/disasm/cs_atomic_swap_x2_int64.s).14eaf6052: enabledshaderBufferInt64AtomicsonVkPhysicalDeviceVulkan12Featuresinruntime/shims/d3d12_vulkan_device.cpp(recorded inruntime/shims/d3d12_com.h, asserted inruntime/test/d3d12_vulkan_device_test.cpp), replaced the single-threadcs_atomic_swap_x2_int64.asmfixture with a 64-thread tearing check, and added dedicated--int64-atomicsrunner pass inscripts/run_gpu_tests.py.Tested
On commit
14eaf6052:python -I tests/semantic/regen_fixtures.py --check(OK)python -I tests/semantic/test_atomic_swap_x2_int64.py(6/6 OKviaspirv_mini_interp.run_workgroup, 64 threads + 14= OpAtomicExchange %ulong)tests/semantic/test_fixtures.py&tests/semantic/test_regen_fixtures.py(OK)tests/test_docs_*.py(OK)compileall(OK)/W4compile-check ofruntime/shims/d3d12_vulkan_device.cpp&runtime/test/d3d12_vulkan_device_test.cpp(OK)GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.