Order consecutive LDS accesses in a one-wave compute group #138
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!138
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/138/head"
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?
@Yeetbot159 on GitHub · 2026-11-22 15:11 UTC · original
Yeetbot159:yeet/one-wave-lds→main· +61 −1 · 3 files · 1 commits · closed without mergingSummary
GroupMemoryBarrierWithGroupSyncbetween them.s_barrieris left alone.ds_swizzle_b32does not count as an LDS access. Mesh shaders are unchanged.Test plan
cargo test -p tombox-xshader --test synthetic one_wave_compute -- --exact one_wave_compute_separates_consecutive_lds_writespassed. It checks an 8x8 group, a 16x16 group, ans_barrier, and a zero preamble.cargo test -p tombox-xshader --libandcargo test -p tombox-xshader --test meshpassed (69 and 20 tests; GPU mesh cases included).@omonkeyz on GitHub · 2026-11-22 15:18 UTC · original
Thanks! The write-after-write case is a real gap: a one-wave console group can run as two PC waves, so two lanes writing the same LDS address need an order. Two small changes, please:
// wave_lds_syncmarker from the generated HLSL. The test can countGroupMemoryBarrierWithGroupSynccalls instead.@Yeetbot159 on GitHub · 2026-11-22 15:52 UTC · original
Rebased onto current main. The extra barrier is only a write after a pending write, and the generated HLSL no longer has the
wave_lds_syncmarker. The test countsGroupMemoryBarrierWithGroupSyncbetween the first two LDS accesses: one between two writes in an 8x8 group, none between two reads, none in a 16x16 group, and none when the preamble size is unknown.@MiguelMatMar on GitHub · 2026-11-22 16:03 UTC · original
Independent run at PR head
405bfb0:one_wave_compute_separates_consecutive_lds_writespasses, andopcodes,syntheticandgcn_dimspass on this branch. (The test checks the generated HLSL, so WARP vs hardware makes no difference to it.)@omonkeyz on GitHub · 2026-11-22 16:10 UTC · original
Applied in
734cda4(merged in1a1e283) with your authorship kept, thanks!Pull request closed