Repository navigation
Shaders: automatically avoid divergent barrier sync on narrow-wave GPUs - #608
Open
rivaldodev wants to merge 1 commit into
Open
rivaldodev wants to merge 1 commit into
rivaldodev wants to merge 1 commit into
Conversation
rivaldodev
force-pushed
the
fix/nvidia-heap-and-barrier-guards
branch
from
November 25, 2026 03:59
3d34951 to
626a650
Compare
|
Could you bring over the |
Adapted from Marvisak/VIctory#1133 to the existing fence_only analysis. Preserves memory fences and explicit overrides, keys the shader cache by host wave width, and adds emitted-flag and hardware-dispatch regression tests.
rivaldodev
force-pushed
the
fix/nvidia-heap-and-barrier-guards
branch
from
November 25, 2026 12:34
626a650 to
8d02480
Compare
Author
|
Done! Rebased onto All 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased onto
main(a253706) and ported thegroup_threads <= console_waverestriction and 128-thread regression test fromZettrox/ztrx#30per@TokyoMkt's feedback.What changed
barrier_modeincrates/victory-shader/src/emit/lower.rs) to single-console-wave groups (group_threads <= console_wave), so multi-console-wave groups (e.g. 128+ threads in wave64) always keepSyncThreadGroupand preserve cross-wave LDS synchronization.main's existingtranslation_fingerprint()(which already hasheshost_max_wave()).2 | 8), and explicitVICTORY_GROUP_SYNCoverrides (0,1,2).Tests
emit::lower::tests::automatic_barriers_keep_fences_and_only_drop_unsafe_sync(covers single-wave, 128-thread multi-wave, unknown group size, uniform, wave64, and explicit overrides).emit::lower::tests::automatic_barrier_flags_reach_the_emitted_shader(verifies emitted DXIL barrier mode for 64-thread vs. 128-thread groups on wave32 and wave64 hosts).emit::wave64_tests::an_automatic_barrier_inside_a_lane_branch_runs_on_narrow_hardware(runs on live narrow-wave GPU hardware).