Repository navigation
Conversation
…e shaders Xbox Series X|S consoles (AMD RDNA 2) frequently run compute shaders in Wave64 mode (wave64: true). In the host DXIL container emission: - container::psv set MinimumWaveLaneCount and MaximumWaveLaneCount strictly to (64, 64). - Shader::finish emitted DXIL entry-point tag 11 (kDxilWaveSizeTag) with 64. On PC hardware with 32-lane execution units (NVIDIA GeForce RTX 20/30/40/50 series and Intel Arc), D3D12 CreateComputePipelineState unconditionally rejects pipelines requiring WaveSize(64) with 0x80070057 (E_INVALIDARG) because WaveLaneCountMax is 32. Fix this by: 1. Setting PSV0 runtime info MinimumWaveLaneCount to 32.min(wave_size) and MaximumWaveLaneCount to wave_size, exposing the [32, 64] range to D3D12 runtime validators. 2. Clamping tag 11 entry-point wave size metadata to 32.min(n) so 32-lane hardware adapters accept compute PSOs while preserving valid lane sizing. 3. Clamping wave stride to 32.min(wave_size) when reconstructing flat thread IDs in lower::thread_id, ensuring consecutive 32-lane host warps (e.g. lanes 32..63 in warp 1) receive non-overlapping, contiguous thread IDs (base & !31) + lane. 4. Updating synthetic test annotations for WaveSize(64) execution on hardware devices.
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.
Imported from Marvisak#3301 for review on this fork.
Upstream source head:
fbbca42873beafa6f4f4953b7e67b7b6b8181e80(fromAdvaitPalve11/VIctory). This commit is directly based on the current fork baseline63bcca43c6a00a758510398fa43096ce7e4f7df0; no commits from main need to be replayed.This is a draft review import only. Please inspect the implementation and tests, resolve any interactions with other review branches, and run the Windows/D3D12 test suite before merging. No local build or hardware validation has been performed by this import.
BLOCKER — do not merge as-is
This change forces Wave64 programs onto WaveSize(32), but the shader lowering still contains Wave64 lane-mask, ballot, and cross-lane assumptions. Reviewers report possible silent cross-half semantic errors and an unintended behavior change on native-Wave64 AMD adapters. A Windows RTX 5090 DXIL-validator run also reported failures in
wave64_permutes_check_exec_within_each_halfandwave64_permutes_stay_within_each_32_lane_halfbecause PSV0 and DXIL wave-size metadata disagree. The correct fix needs a real Wave64-on-Wave32 execution strategy (pair/split/widen/fallback) and validation tests, not just changing metadata.