[pr-fix][rendering] End an argument-clamp batch at arguments written since it opened #29

Manually merged
TrustNo1 merged 0 commits from kisekinopureya/Darner:kisekinopureya/pr/clamp-batch into main 2026-12-03 18:36:45 +00:00
Contributor

Contributor role (optional)

  • Fluxer ID: 1576376229534109696

What it changes

With DARNER_INDIRECT_BATCH=2 (play.ps1's setting), a batch of indirect-argument clamps now also ends
before an indirect execution whose record a shader has been declared to write since the batch opened,
as mode 3 already did. Found on an Arc A770. One file, crates/darner-gpu/src/draw.rs.

How it was tested

  • Tested revision: e835e15128
  • Commands and results: both clippy gates clean; the shader cache, menu and panel tests pass.
  • Gameplay: in the base-branch runs on the Arc A770 (see the shared record); not measured alone.
  • Coverage gaps: no unit test of the batch's end.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #14 (also changes crates/darner-gpu/src/draw.rs); #15 (also changes crates/darner-gpu/src/draw.rs); #17 (also changes crates/darner-gpu/src/draw.rs).

🤖 Generated with Claude Code

## Contributor role (optional) - Fluxer ID: 1576376229534109696 ## What it changes With `DARNER_INDIRECT_BATCH=2` (play.ps1's setting), a batch of indirect-argument clamps now also ends before an indirect execution whose record a shader has been declared to write since the batch opened, as mode 3 already did. Found on an Arc A770. One file, `crates/darner-gpu/src/draw.rs`. ## How it was tested - Tested revision: e835e15128 - Commands and results: both clippy gates clean; the shader cache, menu and panel tests pass. - Gameplay: in the base-branch runs on the Arc A770 (see the shared record); not measured alone. - Coverage gaps: no unit test of the batch's end. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #14 (also changes `crates/darner-gpu/src/draw.rs`); #15 (also changes `crates/darner-gpu/src/draw.rs`); #17 (also changes `crates/darner-gpu/src/draw.rs`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With DARNER_INDIRECT_BATCH=2 (play.ps1's) a batch of clamps now also
ends before an indirect execution whose record a shader since the batch
opened is declared to write, as mode 3 already did.

The title's meshlet culling runs CS_BatchCullMeshlets,
CS_BatchCullPreSkinnedMeshlets_Prev and CS_BatchCullInitArgs as three
indirect dispatches from one argument buffer with no wait between them.
Clamped in one batch, the last read its arguments before the first two
had written them. On an Arc A770, once the light clustering left the
frame fast enough to reach that point, the device was lost at
CS_BatchCullInitArgs about 110 s in, in both fast runs; not with each
dispatch clamped on its own (DARNER_INDIRECT_BATCH=1), and not with
this change (300 s, past the point). The recorded frame alone does not
hang. The 20 batch tests pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit c215c2c58fc625029452f39e12a640eca6c099d3)
Docs that stay in VIctory-NVIDIA (the Arc tracker, the XeSS notes) are
named as its; the product is Darner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 3a1fbef11d2f39449781da5e2e66e86e4b0354dc)
TrustNo1 manually merged commit 7092d21df5 into main 2026-12-03 18:36:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
TrustNo1/Darner!29
No description provided.