GPU: keep indirect argument windows within the named buffers #204

Open
avt0m4t48 wants to merge 1 commit from upstream-pr/204 into main
avt0m4t48 commented 2026-11-24 22:33:35 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-24T22:33:35Z.


Refs #107. Validate the argument and count offsets against the sizes of their named guest buffers before looking up desktop shadows. Cap the clamp window by both the guest and host ranges. If only one record fits, copy its signature stride. A 12-byte record at the end of a buffer previously could acquire the 32-byte look-ahead stride. D3D12 ExecuteIndirect range requirements

Five source-built Rust tests reproduce the old unchecked bounds and window stride and pass with the change. They cover a neighboring buffer, count alignment and size, address wraparound, one remaining record and a short guest range in a larger shadow. cargo check -p victory-gpu --tests --all-features -F blake3/pure --target x86_64-pc-windows-msvc --locked --offline passed. The full native Linux crate build hits existing Windows-only references on the unmodified base.

This is a bounds correction for the existing clamp path. GPU execution and frame timing remain unmeasured. Source-built inputs only. AI-assisted using Codex.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6592753137 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/204). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-24T22:33:35Z. --- Refs #107. Validate the argument and count offsets against the sizes of their named guest buffers before looking up desktop shadows. Cap the clamp window by both the guest and host ranges. If only one record fits, copy its signature stride. A 12-byte record at the end of a buffer previously could acquire the 32-byte look-ahead stride. [D3D12 ExecuteIndirect range requirements](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-executeindirect) Five source-built Rust tests reproduce the old unchecked bounds and window stride and pass with the change. They cover a neighboring buffer, count alignment and size, address wraparound, one remaining record and a short guest range in a larger shadow. `cargo check -p victory-gpu --tests --all-features -F blake3/pure --target x86_64-pc-windows-msvc --locked --offline` passed. The full native Linux crate build hits existing Windows-only references on the unmodified base. This is a bounds correction for the existing clamp path. GPU execution and frame timing remain unmeasured. Source-built inputs only. AI-assisted using Codex.
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/204:upstream-pr/204'
git switch 'upstream-pr/204'

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/204'
git switch 'upstream-pr/204'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/204'
git switch 'upstream-pr/204'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/204'
git switch 'main'
git merge --squash 'upstream-pr/204'
git switch 'main'
git merge --ff-only 'upstream-pr/204'
git switch 'main'
git merge 'upstream-pr/204'
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!204
No description provided.