Repository navigation
Conversation
DispatchX(x, y, z, flags) dropped its flags. With USE_THREAD_DIMENSIONS (0x20; 0x8020 with the wave32 bit) x, y, z are thread counts: the console launches ceil(count / numthreads) groups and leaves the lanes past the count out of EXEC. XCL launched the counts as groups: 32-64x the groups for the retail title's BVH builder (its rehydration and reload passes pass node and primitive counts), past D3D12's 65,535 groups for a large mesh, and every extra thread of the unguarded Box32/Box16 rehydration shaders wrote outside its node array. The flags now reach the dispatch (also one put off to the submit). With 0x20 the counts become whole groups of the pipeline's console numthreads (kept with its user SGPRs at creation); a pipeline whose group shape is not known is not launched, skipped and counted as an untranslated one. The thread count of an axis that does not end on a whole group goes to io slots 114..116 (IO_THREAD_LIMIT), where the compute prologue will leave the lanes past it out of EXEC in a following change: until then the last group still runs whole. Each kind of flags is logged once. Part of a stack: EXEC masking of the last group follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Intersect the existing entry EXEC mask with DispatchX thread bounds in a separate compute entry. Keep ordinary compute emission unchanged. Cover excess-lane stores in 1-D, 2-D and 3-D, split and native wave modes, and ordinary translation byte identity. Runtime selection and precompile integration are separate work. Assisted-by: Codex (GPT-6.1-Sol)
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.
Stacked on #2610 (review only the last commit)
What is in it
Add an opt-in direct-DXIL compute entry that masks lanes outside the requested thread dimensions. It ballots the per-axis bounds after the existing padding mask and intersects the result with EXEC. #2610 supplies the rounded dispatch counts and thread limits. The runtime selection will use this entry for partial groups in a follow-up.
Related: #1751 (BVH rehydration passes issue thread-dimension
DispatchXwith partial last groups), #1833 (world-load roadmap).Why
A 200-second diagnostic run counted 2,999 partial-group dispatches in 3,009 thread-dimension
DispatchXcalls, across four pipelines in the last logged sample. The first appeared at world load. The unguarded-store test shows how extra lanes can write past the requested extent and checks that the mask suppresses them. The ordinary entry emits byte-identical DXIL. This translator source change triggers a one-time rebuild of existing direct-DXIL cache entries.Tested
All at this head,
1208606b, release.SKIPPEDhere.cargo build --workspacepassed.cargo test --workspace --no-fail-fast -- --test-threads=4(XCL_NETWORK=0, RTX 5090): 1,430 passed, 4 failed, 47 ignored, 27 SKIPPED. The 4 failures are the knownfuzz_validate_and_gpu_0..3(DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905). The SKIPPED include the native-wave64 case on this GPU.Regression run
main(08db8020, the base under #2610 and this change; the same block as in #2610's description):This PR (
1208606b):Both: the retail title,
-Seconds 200, RTX 5090, a copy of the same precompiled cache, the same scripted input to the world load, full-size frame dumps. Themainrun used a never-used exe name; this head's run reused a warm one. The ordinary compute translation is unchanged (byte-identical DXIL) and the masked entry is not selected yet, so this is a regression check only.AMD testing requested
On an AMD adapter with native wave64, run this from the branch in PowerShell with DXC available.
Please share the adapter, driver and result, including whether
dispatchx_native_wave64_masks_excess_lanesran without aSKIPPEDline.Not tested
In-title behavior and first-use compile timing are for the runtime follow-up.
AI use
Codex (GPT-6.2-Sol) wrote the change, tests and description. Claude Code (Claude Opus 5.5) ran the independent validation on both adapters and the smoke pair.
🤖 Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR