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

Closed
github-bot wants to merge 11 commits from github-bot/gh-4200 into main AGit
Owner

@⁠marquezlale-creator on GitHub · 2026-11-30 17:22 UTC · original
marquezlale-creator:pr/batch-notes-no-lock → main · +778 −820 · 32 files · 11 commits · closed without merging

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

**@⁠marquezlale-creator** on GitHub · 2026-11-30 17:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4200) `marquezlale-creator:pr/batch-notes-no-lock` → `main` · +778 −820 · 32 files · 11 commits · closed without merging ## 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)
note_batch_write runs for every write shaders declare (thousands a frame) and
took the list's deferred lock even below batch mode 3, where nothing reads the
log. It now returns first unless the batches that read it are on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:31 +00:00
github-bot closed this pull request 2026-12-01 18:50:31 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

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.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4200#issuecomment-7321497286) 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

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4201
No description provided.