GPU: charge each gathered indirect execution #1310

Open
Filip722 wants to merge 1 commit from upstream-pr/1313 into main
Filip722 commented 2026-11-26 13:50:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-26T13:50:54Z.


Two gathered indirect draws can read the same argument offset. The gather set reused the same slot for both draws, so the clamp saw one record and charged the per-list budget once.

Allocate one offset-table slot per execution. Keep the existing slot limit and the existing individual-clamp fallback when a set fills. A linear slot counter also removes the per-set hash map.

Validation

  • The new asset-free fixture failed on a20809de because the second execution reused slot 0. The fix gives it slot 1, preserves both offsets in the table and returns no slot after the table fills.
  • Three focused tests passed in the Windows MSVC release diagnostics build under GE-Proton11-14 and vkd3d-proton 3.2.0. D3D12 selected an RTX 5060 Laptop GPU with NVIDIA 615.78.08 for the new fixture.
  • Asset policy passed for 220 files. Windows-target Clippy passed for all victory-gpu targets and features with warnings denied. The replay comparing PR #1171's batching is a separate experiment.

Assisted by Codex (GPT-6.2-Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:issue:6628091526 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1313). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-26T13:50:54Z. --- Two gathered indirect draws can read the same argument offset. The gather set reused the same slot for both draws, so the clamp saw one record and charged the per-list budget once. Allocate one offset-table slot per execution. Keep the existing slot limit and the existing individual-clamp fallback when a set fills. A linear slot counter also removes the per-set hash map. ## Validation - The new asset-free fixture failed on `a20809de` because the second execution reused slot 0. The fix gives it slot 1, preserves both offsets in the table and returns no slot after the table fills. - Three focused tests passed in the Windows MSVC release diagnostics build under GE-Proton11-14 and vkd3d-proton 3.2.0. D3D12 selected an RTX 5060 Laptop GPU with NVIDIA 615.78.08 for the new fixture. - Asset policy passed for 220 files. Windows-target Clippy passed for all victory-gpu targets and features with warnings denied. The replay comparing PR #1171's batching is a separate experiment. Assisted by Codex (GPT-6.2-Sol High).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1313:upstream-pr/1313'
git switch 'upstream-pr/1313'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1313'
git switch 'upstream-pr/1313'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1313'
git switch 'upstream-pr/1313'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1313'
git switch 'main'
git merge --squash 'upstream-pr/1313'
git switch 'main'
git merge --ff-only 'upstream-pr/1313'
git switch 'main'
git merge 'upstream-pr/1313'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1310
No description provided.