mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 12:29:57 -04:00
Let the present thread finish before the held work is walked at a present, which it may be replaying and freeing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -224,7 +224,10 @@ static int present_held_on(void) {
|
|||||||
static uint64_t submit_sync(const uint64_t *handles, int n);
|
static uint64_t submit_sync(const uint64_t *handles, int n);
|
||||||
|
|
||||||
// The held work that can go on now, in a submission of its own (vk_exec_record syncs it like any other: held_sync).
|
// The held work that can go on now, in a submission of its own (vk_exec_record syncs it like any other: held_sync).
|
||||||
|
// The present thread first finishes what it was handed: its empty submission replays held work and frees what it
|
||||||
|
// replayed (vk_exec_record), which this walk reads. A present ph_flush handed it a moment ago is such a case.
|
||||||
static int held_resume(void) {
|
static int held_resume(void) {
|
||||||
|
vk_present_drain();
|
||||||
if (!vk_exec_held() || !vk_exec_held_ready()) return 0;
|
if (!vk_exec_held() || !vk_exec_held_ready()) return 0;
|
||||||
submit_sync(NULL, 0);
|
submit_sync(NULL, 0);
|
||||||
PH.ran++;
|
PH.ran++;
|
||||||
|
|||||||
Reference in New Issue
Block a user