Batched clamps' write log: no lock per declared write unless VICTORY_INDIRECT_BATCH=3 #4200

Closed
marquezlale-creator wants to merge 11 commits from upstream-pr/4200 into main
marquezlale-creator commented 2026-11-30 17:22:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by marquezlale-creator on 2026-11-30T17:22:12Z.


What it changes

HostList::note_batch_write is called for every write shaders declare (Shadow::gpu_writes / shader_writes on every path), thousands of times a frame, and it took the list's deferred lock each time. The log it fills is only read with VICTORY_INDIRECT_BATCH=3 (HostList::batch_written); below that it is never created, so the lock was taken for nothing. It now returns first unless draw::batches() == 3.

How it was tested

  • GPU and profile: RTX 5070, Series X, 2560x1440, DLSS balanced.
  • Before / After: no behaviour change below batch mode 3 (the log was None there); the list threads take one lock less per declared write. Found by reading while profiling the list threads; not measured on its own in fps.
  • For shader changes: none.
  • cargo test passed for the crates it touches: cargo check -p victory --tests yes.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none found.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5570223715 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4200). Originally posted by [marquezlale-creator](https://github.com/marquezlale-creator) on 2026-11-30T17:22:12Z. --- ## What it changes `HostList::note_batch_write` is called for every write shaders declare (`Shadow::gpu_writes` / `shader_writes` on every path), thousands of times a frame, and it took the list's deferred lock each time. The log it fills is only read with `VICTORY_INDIRECT_BATCH=3` (`HostList::batch_written`); below that it is never created, so the lock was taken for nothing. It now returns first unless `draw::batches() == 3`. ## How it was tested - GPU and profile: RTX 5070, Series X, 2560x1440, DLSS balanced. - Before / After: no behaviour change below batch mode 3 (the log was `None` there); the list threads take one lock less per declared write. Found by reading while profiling the list threads; not measured on its own in fps. - For shader changes: none. - `cargo test` passed for the crates it touches: `cargo check -p victory --tests` yes. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none found. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
trustno1-coder commented 2026-12-01 18:45:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:45: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:7321497286 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4200#issuecomment-7321497286). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:45: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!4200
No description provided.