Repository navigation
Prefer paired wave64 for masked first-lane reads - #1
Open
carlosmegino wants to merge 2 commits into
Open
carlosmegino wants to merge 2 commits into
carlosmegino wants to merge 2 commits into
Conversation
Adapt de64bd5 to PR 854 and exercise the public translator with synthetic 64- and 128-thread guest containers. Validate both wave selections, the seven UAVs and their padding on a D3D12 wave32 adapter.
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.
Summary
A compute shader using logical wave64 can have an EXEC-masked
v_readfirstlane_b32that elects a lane from the other half. On a wave32 adapter, the ordinary translation can succeed and still elect independently in each half. Try the exact paired form first for non-waterfall masked first-lane reads. Preserve the existing translation fallback when pairing declines the shader.This PR targets
pr/shadersat51700c6, the head of fxceless#854. Commit805a455adaptsde64bd5and adds the readback regression. Commitb252f2dadds the runtime PSO check.Validation
RTX 5070 Ti, D3D12 wave limits 32/32. On unmodified
51700c6and7af465b(fxceless#994), both group sizes returned 0 instead of 40 in UAV 2, lane 0. With the fix, groups of 64 and 128 logical threads match the CPU reference in all seven UAVs at every lane. The two-wave group uses different EXEC masks and loop counts, keeps each wave's LDS separate, reads from opposite halves and reaches a shared group barrier. Canaries remained intact with zero D3D12 GPU validation warnings or errors.A separate runtime test starts from the device's reported wave capabilities, creates both PSOs and checks the automatically selected group sizes of 32 and 64 physical threads. On fxceless#994, the validation port preserves the branch's separate handling of thread-count-limited dispatch.
For reproduction on a wave32 GPU, install Windows Graphics Tools, provide the DXIL validator and use a writable synthetic fixture directory outside the checkout:
All inputs are synthetic. This PR does not measure gameplay stability or frame rate. Refs Marvisak/VIctory#2688.