mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:55:52 +01:00
[PR #94] rdna2spirv: use OpAtomicStore for MSG_GS_ALLOC_REQ %ms_counts (SHADER-766) #147
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#147
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/94
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9826📝 Commits (1)
a63d296rdna2spirv: use OpAtomicStore for MSG_GS_ALLOC_REQ %ms_counts (SHADER-766)📊 Changes
2 files changed (+13 additions, -38 deletions)
View changed files
📝
tests/test_mesh_alloc_single_writer.py(+9 -26)📝
tools/rdna2spirv.py(+4 -12)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116641828
What and why
On
main@2d53a8055,s_sendmsg(MSG_GS_ALLOC_REQ)intools/rdna2spirv.pygatesOpStore %ms_countsonlocal_index == 0. When a non-zero wave sends the allocation — as inruntime/test/shaders/ms_wave_info_s3.asm, where wave 0 skipsMSG_GS_ALLOC_REQand wave 1 (local_index64..127) executes it —%ms_countsis never written, causingms_wave_info_s3to render nothing ((-1, -1, -1, -1)clear color) on both nativeVK_EXT_mesh_shaderandLEONIDA_MESH_COMPUTE=1.Replaces the
local_index == 0guard + plainOpStorewithOpAtomicStore %ms_counts %c2 %c0 %m(Workgroup scope, Relaxed semantics), followed by the shader's existing workgroup barrier, and updatestests/test_mesh_alloc_single_writer.py. (Re-opening cleanly onmain@2d53a8055after earlier SHADER-766 PRs#5741/#5855were closed in the reset; credit to their authors for the root-cause analysis.)Verification (Windows 11 Home 26H2, MSYS2 clang64 LLVM 23.1.5 / SPIRV-Tools v2026.4, no game files)
python -I tests/test_mesh_alloc_single_writer.py -v-> OK.10de:24e0, driver616.64, Vulkan1.4.351):main):ms_wave_info_s3FAIL (got (-1,-1,-1,-1)).VK_EXT_mesh_shader,--filter ms_): 5/6 passed, 1 skipped (ms_wave_info_s3:4096/4096 pixels exact).LEONIDA_W64_EMULATE=1,--filter ms_): 6/6 passed (ms_wave_info_s3:4096/4096 pixels exact).8086:46a6, driver32.0.101.7088, Vulkan1.4.323):main,LEONIDA_MESH_COMPUTE=1 + LEONIDA_W64_EMULATE=1):ms_wave_info_s3FAIL (got (-1,-1,-1,-1)).LEONIDA_MESH_COMPUTE=1 + LEONIDA_W64_EMULATE=1,--filter ms_): 6/6 passed (ms_wave_info_s3:4096/4096 pixels exact).python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/test_mesh_alloc_single_writer.py: clean (rc=0).git diff --check: clean (rc=0).AI-assisted.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.