Repository navigation
vk: batched submits: a progress poll flushes only after 2 ms by default - #689
Merged
Merged
Conversation
RX_VK_BATCH_POLL_US defaulted to 0, so every progress poll sent the held submits. The game polls many times a frame, and on RADV each of those flushes is a full command submission, the cost batching exists to avoid. RX_VK_BATCH_POLL_US=0 restores the old behaviour. Refs NotRexed#413, NotRexed#528. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
With
RX_VK_BATCHon (the default on RADV),get_replayed()sends the held submits on every progress poll, becauseRX_VK_BATCH_POLL_USdefaults to 0. The game polls many times a frame, so most flushes come from polls, and each one is a full command submission. That is the cost batching exists to avoid.This makes the default 2000 µs, as suggested in #413 and #528. A poll then flushes only once the oldest held submit has waited 2 ms.
RX_VK_BATCH_POLL_US=0restores the old behaviour. Flushes for waits, values, slots and presents are unchanged, so held work is delayed by at most 2 ms on the poll path.Measured
RX 7800 XT, RADV, Kokiri Forest, Link idle on the balcony at about 2150 draws. 60 s per run, 2 runs per setting, on one build with the settings interleaved.
RX_VK_BATCH_POLL_USAn earlier sweep on 7e9bf73 + #448 was flat from 1 to 16 ms: 41.4 to 43.7 fps against 37.1 and 37.3 for 0.
Not covered
RX_VK_BATCH=1.🤖 Generated with Claude Code