Measure frame-shot readbacks separately inside prelude lists #1141

Open
BradRoland wants to merge 1 commit from upstream-pr/1144 into main
BradRoland commented 2026-11-25 21:36:36 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by BradRoland on 2026-11-25T21:36:36Z.


Run 271 measured 36.1 ms in prelude lists, including the diagnostic copies of textures leaving writable states. This change lets a frame shot show how much of that interval the capture itself used.

The existing PRELUDE event still covers the whole list. When capture commands run, a SHOT READBACK event on the same list covers the transition to copy source, the copies, and the restoration of the original states. Subtract its duration from the inclusive prelude duration to get the remaining GPU time. Both events use adjacent start and end slots in stamps.txt. The query resolve runs after both intervals close. Lists recorded for the shot and submitted after present retain their timestamps.

I reproduced the missing interval on the base revision and verified the change with two synthetic render-target arrays on D3D12 WARP. Four copied slices produced one nested interval in both normal and post-present submissions. A zero capture budget produced only the inclusive interval. The GPU crate passed all 202 enabled diagnostics tests with cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1. The full workspace passed 586 tests with cargo test --workspace --locked -- --test-threads=1 (12 ignored). Testing used synthetic data throughout.

Workspace all-features Clippy reports the same ten diagnostics on this branch and on clean upstream 9c184b3.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6614240246 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1144). Originally posted by [BradRoland](https://github.com/BradRoland) on 2026-11-25T21:36:36Z. --- Run 271 measured 36.1 ms in prelude lists, including the diagnostic copies of textures leaving writable states. This change lets a frame shot show how much of that interval the capture itself used. The existing `PRELUDE` event still covers the whole list. When capture commands run, a `SHOT READBACK` event on the same list covers the transition to copy source, the copies, and the restoration of the original states. Subtract its duration from the inclusive prelude duration to get the remaining GPU time. Both events use adjacent start and end slots in `stamps.txt`. The query resolve runs after both intervals close. Lists recorded for the shot and submitted after present retain their timestamps. I reproduced the missing interval on the base revision and verified the change with two synthetic render-target arrays on D3D12 WARP. Four copied slices produced one nested interval in both normal and post-present submissions. A zero capture budget produced only the inclusive interval. The GPU crate passed all 202 enabled diagnostics tests with `cargo test -p victory-gpu --features diagnostics --locked -- --test-threads=1`. The full workspace passed 586 tests with `cargo test --workspace --locked -- --test-threads=1` (12 ignored). Testing used synthetic data throughout. Workspace all-features Clippy reports the same ten diagnostics on this branch and on clean upstream `9c184b3`.
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/1144:upstream-pr/1144'
git switch 'upstream-pr/1144'

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