Test that batched mesh draws preserve per-draw root constants #893

Open
Lkxex wants to merge 1 commit from upstream-pr/894 into main
Lkxex commented 2026-11-25 12:06:56 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Lkxex on 2026-11-25T12:06:56Z.


Relates to #828.

Adds a GPU regression test for packing multiple mesh dispatches into one ExecuteIndirect call. The baseline uses the runtime's existing single-record command signature and sets mesh and pixel root constants separately for each draw. The batched path packs distinct constants with two nonadjacent records from the existing GPU argument clamp. The test compares every pixel against the baseline and checks that both expected colors are rendered.

Passed on a Radeon RX 6600 with the D3D12 debug layer enabled. This adds the regression test only. Runtime draw batching, NVIDIA verification, and in-game performance measurements are still pending.

AI-assisted.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6604101885 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/894). Originally posted by [Lkxex](https://github.com/Lkxex) on 2026-11-25T12:06:56Z. --- Relates to #828. Adds a GPU regression test for packing multiple mesh dispatches into one ExecuteIndirect call. The baseline uses the runtime's existing single-record command signature and sets mesh and pixel root constants separately for each draw. The batched path packs distinct constants with two nonadjacent records from the existing GPU argument clamp. The test compares every pixel against the baseline and checks that both expected colors are rendered. Passed on a Radeon RX 6600 with the D3D12 debug layer enabled. This adds the regression test only. Runtime draw batching, NVIDIA verification, and in-game performance measurements are still pending. AI-assisted.
CooShii commented 2026-11-25 13:06:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by CooShii on 2026-11-25T12:50:55Z.


Verified on an RTX 5080 with NVIDIA driver 621.01, Windows 11 25H2 (build 26200.9974), Rust 1.98.1 MSVC, and DXC from Windows SDK 10.0.26100.0.

The unmodified test passed at 910ea45f4e568ff4e1a53cb3a31cdf4acfeb3d70. The batched and individual draws matched pixel for pixel. A second run confirmed that D3D12 selected the RTX 5080. The D3D12 debug layer was unavailable on this machine.

cargo test --locked -p victory-gpu --features diagnostics --lib pipeline::host::tests::indirect_mesh_batch_preserves_per_record_root_constants -- --exact --nocapture

This was the synthetic fixture, with no game files or gameplay measurements.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162940539 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/894#issuecomment-7162940539). Originally posted by [CooShii](https://github.com/CooShii) on 2026-11-25T12:50:55Z. --- Verified on an RTX 5080 with NVIDIA driver 621.01, Windows 11 25H2 (build 26200.9974), Rust 1.98.1 MSVC, and DXC from Windows SDK 10.0.26100.0. The unmodified test passed at `910ea45f4e568ff4e1a53cb3a31cdf4acfeb3d70`. The batched and individual draws matched pixel for pixel. A second run confirmed that D3D12 selected the RTX 5080. The D3D12 debug layer was unavailable on this machine. ```powershell cargo test --locked -p victory-gpu --features diagnostics --lib pipeline::host::tests::indirect_mesh_batch_preserves_per_record_root_constants -- --exact --nocapture ``` This was the synthetic fixture, with no game files or gameplay measurements.
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/894:upstream-pr/894'
git switch 'upstream-pr/894'

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