Repository navigation
Conversation
Add Wave64Mode (Native, Wave32, Emulate) and TranslateOptions so Wave64 compute shaders lower and run on 32-lane GPUs (NVIDIA/Intel) and narrower hosts such as WARP instead of failing CreateComputePipelineState with E_INVALIDARG on WaveSize(64). - Add Wave64Mode, TranslateOptions, translate_with, and emit_with while keeping translate/emit defaulting to Wave64Mode::Native. - Resolve constant-lane SGPR spills across v_writelane_b32/v_readlane_b32 via resource::spilled_sgprs. - Implement virtual 64-lane mapping for Wave32 (two aligned 32-lane waves) and portable LDS emulation without WAVE_OPS for narrower hosts, with post-dominator uniformity checks to reject cross-half barriers in divergent control flow rather than hanging. - Auto-detect host wave capabilities in victory-gpu::Host (with VICTORY_WAVE64_EMULATE override and mode byte in shader_cache keys) and in victory translate --pipelines. - Add synthetic RDNA2 compute tests (PSO validation + execution on hardware GPU and WARP).
Follow the synthetic LDS ordering case reported by marquezinii on Marvisak#189. Fence at proven uniform joins and exits, and reject unfenceable divergent accesses. Keep the native path and multi-console-wave lowering unchanged.
alfycs
force-pushed
the
feat/wave64-compute-emulation
branch
from
November 24, 2026 13:20
d0fd9bf to
b472733
Compare
alfycs
added a commit
that referenced
this pull request
Nov 24, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
Owner
|
Integrated cleanly (with |
enbo1223
pushed a commit
to enbo1223/VIctory
that referenced
this pull request
Nov 24, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from alfycs#1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
alfycs
added a commit
that referenced
this pull request
Nov 25, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
alfycs
pushed a commit
that referenced
this pull request
Nov 25, 2026
Exercise the descriptor cursor regression on the actual heap capacity
alfycs
added a commit
that referenced
this pull request
Nov 25, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
alfycs
added a commit
that referenced
this pull request
Nov 25, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
alfycs
added a commit
that referenced
this pull request
Nov 25, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
alfycs
added a commit
that referenced
this pull request
Nov 25, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
alfycs
added a commit
that referenced
this pull request
Nov 25, 2026
…PP, host) Incorporate verified follow-up fixes from PR Marvisak#189 reviewers and contributors: - Fence single-console-wave LDS accesses at group-uniform joins/exits and reject unfenceable divergent regions (fixes marquezinii's split-block stale LDS readback; from #1 by @erickbobd). - Allow Wave32 divergent v_readfirstlane per half without LDS barriers (fixes waterfall loops / common divergent refusals reported by @AKA0GHOST and @NuraadGit), preserve ValUniform propagation across unguarded v_mov_b32 copies for uniform v_readfirstlane in divergent branches (@marquezinii), and return lane 0 when EXEC == 0 in emulated_readfirstlane. - Clamp DPP row_shr/row_shl lane indices using inside before read_lane/exchange_64 to avoid out-of-range waveReadLaneAt on WARP 1.0.22 (@ifBars). - Verify DXGI_ADAPTER_FLAG_SOFTWARE in shader::emit::host::Host::new(true) for Wine/DXVK (@dpalacios69, @tanishq-dubey), base recommended_wave64_mode_matches_device_capabilities on queried capabilities (@ifBars), and serialize wave64 GPU tests under valu_tests::ONE_AT_A_TIME (@r4tedx). Co-authored-by: erickbobd <188809599+erickbobd@users.noreply.github.com>
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.
Split wave64 programs on Marvisak#189 can read LDS before the other host half has finished its write. On the exact PR head, the delayed/divergent writer fixtures return stale values on an RTX 5070 Ti and WARP.
This is a one-commit follow-up to Marvisak#189 at
d0fd9bf. It adds group synchronization at proven uniform joins and exits for single-console-wave groups. Divergent regions with multiple LDS accesses and no safe checkpoint are refused conservatively, including sibling arms and early-return cases. The permanent tests also protect the already-correct same-block EXEC-guarded case.Credit: follows marquezinii's synthetic report. Related approaches on different stacks: Marvisak#192 and Marvisak#439.
Validation on Windows 11 25H2 26200.9974, RTX 5070 Ti / NVIDIA 617.14, Rust 1.98.1, SDK 10.0.26100.0 DXIL validator; 20 readbacks per fixture/mode:
-D warnings, changed-file rustfmt, asset policy and diff checks passed.Scope: single-wave synthetic coverage. Multi-wave groups, gameplay and performance are unverified. The refusal is deliberately conservative and can reject otherwise independent accesses. No game files, generated game shaders, captures or raw title logs are included.
AI-assisted (Codex).