mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 11:49:59 -04:00
Count a frame's submissions atomically: several guest threads submit at once from the pause menu's first frame on.
With a lost count the frame's first submission could go without its wait for the GPU, which is there against frames drawn with the next frame's data. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -866,7 +866,7 @@ NVN_API(nvnQueuePresentTexture) {
|
||||
rt_fatal("nvn: QueuePresentTexture of image %d on window %p", idx, (void *)o);
|
||||
nvn_call_note(1, (uintptr_t)arg_p(c, 0), 1);
|
||||
o->presents++;
|
||||
nvn_submits_in_frame = 0;
|
||||
__atomic_store_n(&nvn_submits_in_frame, 0, __ATOMIC_RELAXED);
|
||||
const tex_t *t = (const tex_t *)o->tex[idx];
|
||||
uint64_t period = present_period(o), now = kern_now_ns();
|
||||
uint64_t slot = now + pace(&o->pace, now, period);
|
||||
|
||||
Reference in New Issue
Block a user