gpu: an indirect batch opened before a shader that can write buffers takes no more records #204

Closed
github-bot wants to merge 1 commit from gh-pr/204/head into gh-pr/204/base
Owner

@⁠HeroOfOlympus on GitHub · 2026-12-02 16:25 UTC · original
HeroOfOlympus:rt-indirect-batch → main · +3 −0 · 1 files · 1 commits · closed without merging

A batch's clamp runs where it was opened, so a record placed after a shader that can write buffers (Batch::wrote) read stale arguments: RT shadows flickered (Linux, RX 9070 XT). Such a record now opens a new batch after the write; runs without writes between still share one batch, so it costs far less than taking in-place indirect executions out of batches (~5000–7700 per frame in play).

🤖 Generated with Claude Code

**@⁠HeroOfOlympus** on GitHub · 2026-12-02 16:25 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/204) `HeroOfOlympus:rt-indirect-batch` → `main` · +3 −0 · 1 files · 1 commits · closed without merging A batch's clamp runs where it was opened, so a record placed after a shader that can write buffers (`Batch::wrote`) read stale arguments: RT shadows flickered (Linux, RX 9070 XT). Such a record now opens a new batch after the write; runs without writes between still share one batch, so it costs far less than taking in-place indirect executions out of batches (~5000–7700 per frame in play). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A batch's clamp runs where the batch was opened. A record placed in it after a
shader that can write buffers (`Batch::wrote`) read its arguments as they were
before that shader: RT shadows and other GPU-driven passes flickered. Such a
record now opens a new batch, after the write. Runs of records with no write
between them still share one batch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 16:59:17 +00:00
github-bot closed this pull request 2026-12-02 16:59:17 +00:00
Author
Owner

@⁠HeroOfOlympus on GitHub · 2026-12-02 16:40 UTC · original

Closing: the flicker turned out to be list translation order (VICTORY_THIN_ORDER-style), not batches.

**@⁠HeroOfOlympus** on GitHub · 2026-12-02 16:40 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/204#issuecomment-7352306738) Closing: the flicker turned out to be list translation order (VICTORY_THIN_ORDER-style), not batches.
Author
Owner

@⁠HioShan on GitHub · 2026-12-02 23:31 UTC · original

Thanks for narrowing this down. We see what looks like the same thing on an RX 9070 XT with RADV: in the evening the long shadows of bushes and palms flicker or drop out, and with VICTORY_BVH_BUILDER=1 every vegetation shadow flickers. Your closing note says the cause was list translation order rather than batches. Could you share that change, as a branch or a PR, even a rough one? We'd test it at the same evening spot and report back here.

**@⁠HioShan** on GitHub · 2026-12-02 23:31 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/204#issuecomment-7362111577) Thanks for narrowing this down. We see what looks like the same thing on an RX 9070 XT with RADV: in the evening the long shadows of bushes and palms flicker or drop out, and with `VICTORY_BVH_BUILDER=1` every vegetation shadow flickers. Your closing note says the cause was list translation order rather than batches. Could you share that change, as a branch or a PR, even a rough one? We'd test it at the same evening spot and report back here.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.