mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
setting_presents says how many more presents a new scene size counts as the result of a settings change (the resize hold of vk_backend.c frame_hold). vk_dlaa_frame sets and counts it down, and vk_dlaa_resized_take tests and clears it at the same present. With the replay on the submitting threads the frame's bookkeeping, vk_dlaa_frame among it, can run on another thread than the presenting one (another thread's replay, or the next submission once the bookkeeping goes in replay order), so a plain test-then-clear beside a plain decrement could take the hold twice or miss it. Now the take is two exchanges, which give the outcome of the old two statements, and the count-down is a compare-and-swap that stops at 0, so it never goes below a clear made meanwhile. Not reproduced before the change. Checks that passed: pass_cc_check of vk_dlaa.c with no new -Wall -Wextra warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
228 KiB
228 KiB