Repository navigation
Conversation
Adapt fxceless/victory-fork#834, preserving the native AMD path and the thread-count constants. Opt in with VICTORY_DISPATCH_SPLIT=1 on a 32-lane host. Split single compute records without count buffers and leave other dispatches on their existing path. (cherry picked from commit b9ab1ee0fbc7e66a60322f60f768aeb43e3e23e3)
Use the same host-gated setting that controls group-base lowering, keeping the key stable on wave64 when the switch is irrelevant. Regression and fix suggested by sawetco in PR #10.
Owner
Author
|
Opt-in split limits itself to eligible wave32 indirect dispatches and checks each group once on WARP. Verify AMD timings and NVIDIA parity after resolving the fork #7 conflict. |
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.
What this addresses
On NVIDIA, this fork clamps indirect compute dispatches at 65,535 groups in X. Larger dispatches can miss the last lighting tiles and leave stale pixels. Related fxceless/victory-fork#834 includes world reports of this artifact on RTX cards. This adapts Carlos Sant'Anna's patch to this fork and preserves its commit attribution.
Change
With
VICTORY_DISPATCH_SPLIT=1on a 32-lane host, a single indirect compute record without a count buffer can run up to 131,070 groups in X. The two executions share the original budget. Only shaders that read the X group ID receive the extra root dword. The host sets it before the second execution and clears it afterward. The opt-in path bypasses the batch clamp for eligible calls so the tail executes next to the first part.Verification
WARP ran the translated shader at group bases 0 and 65,535. The indirect fixture checked each group once across eight cases, including an 89,968-group workload, the upper cap, Y/Z coverage, and budget rejection. With splitting disabled, the fixture stops at 65,535. Windows validation
The native lowering test also checks that a 64-lane host gets no new group-base constant.
The replay regression verifies that skipping clamps copies both argument records. Replay clamp batching keeps lists with split dispatches in their recorded form.
The translator and pipeline cache keys now include the effective dispatch split setting. The regression test distinguishes on and off for wave32 and verifies a stable key for wave64. Thanks to sawetco for reproducing the collision and verifying the key strategy on an RTX 5070. Hardware cache investigation Windows regression check
For gameplay validation, compare the same checkpoint with and without splitting on a 32-lane GPU. The effect on frame time is unmeasured on this fork.
scripts\play.ps1can pass the switch through-More @{VICTORY_DISPATCH_SPLIT='1'}.AI-assisted with Codex. The tests use synthetic shaders and buffers.