Skip to content

Split wide indirect dispatches on 32-lane GPUs - #7

Open
Sr-0w wants to merge 5 commits into
integrationfrom
upstream/pr-10
Open

Sr-0w wants to merge 5 commits into
integrationfrom
upstream/pr-10

Conversation

@Sr-0w

@Sr-0w Sr-0w commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Imported from upstream avatarmanz/VIctory-7900XTX#10 by gomeaw (commits and authorship kept as they are). Review happens here; the original author is welcome to carry it on in this repository.

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=1 on 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.ps1 can pass the switch through -More @{VICTORY_DISPATCH_SPLIT='1'}.

AI-assisted with Codex. The tests use synthetic shaders and buffers.

SantannaCarlos and others added 5 commits November 26, 2026 01:12
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.
@Sr-0w

Sr-0w commented Nov 26, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants