With sync_ahead, a timestamp the frame wait did not cover reads as the newest one written at that wait, so the dynamic resolution controller never reads a wrapped GPU time (#1123)

The game converts the end and then the begin report of a pair and subtracts them unsigned. With the frame wait one
frame late the end could be unwritten (0) or hold the value of the report before it, and the difference wrapped to
about 2^64: an over-budget frame for the controller, two in a row drop the game to its lowest quality level. Reads of
a report that holds 0, a time after the bound, or whose newest replayed report is not done read the bound instead,
so a pair in submission order never reads end < begin. Guest memory, RENDER_COND and samples-passed counts are
unchanged. TOTK_SYNC_AHEAD_TIMESTAMPS=0 turns it off, =check counts without replacing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-25 15:46:45 +03:00
1 parent ed8fa04034
commit 47eb44d1b2
5 files changed
+107 -5

No files matched your search

+2
View File
@@ -581,6 +581,7 @@ NVN_API(nvnSyncWait) {
if (det) vk_ahead_frame_lag(s->fence, lag, behind);
b->cpu_synced(want == s->fence ? s->fence : b->fence_done());
if (det) vk_ahead_frame_done(1);
if (mode == 1) vk_counter_frame();
ret_x(c, NVN_SYNC_WAIT_RESULT_ALREADY_SIGNALED);
return;
}
@@ -592,6 +593,7 @@ NVN_API(nvnSyncWait) {
if (det) vk_ahead_frame_lag(s->fence, lag, behind);
if (ok) b->cpu_synced(want == s->fence ? s->fence : b->fence_done());
if (det) vk_ahead_frame_done(ok);
if (mode == 1) vk_counter_frame();
ret_x(c, ok ? NVN_SYNC_WAIT_RESULT_CONDITION_SATISFIED : NVN_SYNC_WAIT_RESULT_TIMEOUT_EXPIRED);
}
// void nvnEventBuilderSetDefaults(NVNeventBuilder *b)