Measure refresh sifting without a kept write watch #4271

Closed
SmallDevBigNothing wants to merge 11 commits from upstream-pr/4271 into main
SmallDevBigNothing commented 2026-11-30 18:01:46 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by SmallDevBigNothing on 2026-11-30T18:01:46Z.


What it changes

The review on #3762 asked whether separate dirty-range sifting helps when a flush cannot reuse a kept write watch. Extend the existing ignored submission benchmark to measure that case alongside the kept path. Add a mixed owned/write-watched fixture, attribute time to sifting, write-watch queries and refresh, and verify that each expected write reached the destination. This changes only the benchmark.

How it was tested

Windows on a Core Ultra 5 225F, release profile, three worker threads. The wide fixture has 4,096 spans across eight flushes per sample, with one in eight spans changed. Medians below are from six processes per configuration with 64 measured samples each after warmup.

Flush-local write watch Sift off Sift on
Wide, all watched 1.07 ms 1.47 ms
Wide, mixed owned and watched 0.61 ms 0.78 ms
Mixed candidate ranges handed to write watch 4,096 960

The mixed case sent fewer candidate ranges with sifting enabled, while the total CPU time increased. The kept-watch results were within run-to-run variation. These are CPU benchmark results without a title or GPU requirement.

To reproduce in PowerShell, run the following twice with VICTORY_FLUSH_SIFT set to 0 and 1. Repeat with VICTORY_ASK_ONCE=1 for the kept-watch control.

$env:VICTORY_ASK_ONCE = '0'
$env:VICTORY_FLUSH_SIFT = '0'
cargo test --locked --release -p victory-gpu write_watched_submission_throughput -- --ignored --nocapture

Seven focused refresh correctness tests and the staged asset policy check passed on Windows. No shader or gameplay checks apply to this benchmark change.

Checked for overlap

Related to the merged #3762 and its review follow-up above.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5570863375 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4271). Originally posted by [SmallDevBigNothing](https://github.com/SmallDevBigNothing) on 2026-11-30T18:01:46Z. --- ## What it changes The [review on #3762](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3762#issuecomment-7270568553) asked whether separate dirty-range sifting helps when a flush cannot reuse a kept write watch. Extend the existing ignored submission benchmark to measure that case alongside the kept path. Add a mixed owned/write-watched fixture, attribute time to sifting, write-watch queries and refresh, and verify that each expected write reached the destination. This changes only the benchmark. ## How it was tested Windows on a Core Ultra 5 225F, release profile, three worker threads. The wide fixture has 4,096 spans across eight flushes per sample, with one in eight spans changed. Medians below are from six processes per configuration with 64 measured samples each after warmup. | Flush-local write watch | Sift off | Sift on | | --- | ---: | ---: | | Wide, all watched | 1.07 ms | 1.47 ms | | Wide, mixed owned and watched | 0.61 ms | 0.78 ms | | Mixed candidate ranges handed to write watch | 4,096 | 960 | The mixed case sent fewer candidate ranges with sifting enabled, while the total CPU time increased. The kept-watch results were within run-to-run variation. These are CPU benchmark results without a title or GPU requirement. To reproduce in PowerShell, run the following twice with VICTORY_FLUSH_SIFT set to 0 and 1. Repeat with VICTORY_ASK_ONCE=1 for the kept-watch control. ```powershell $env:VICTORY_ASK_ONCE = '0' $env:VICTORY_FLUSH_SIFT = '0' cargo test --locked --release -p victory-gpu write_watched_submission_throughput -- --ignored --nocapture ``` Seven focused refresh correctness tests and the staged asset policy check passed on Windows. No shader or gameplay checks apply to this benchmark change. ## Checked for overlap Related to the merged #3762 and its review follow-up above.
trustno1-coder commented 2026-12-01 18:44:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:44:51Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321464184 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4271#issuecomment-7321464184). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:44:51Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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
trustno1-coder/VIctory-NVIDIA!4271
No description provided.