mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 06:59:57 -04:00
Runtime: power opt-out, faster fence wake-ups, feedback barrier, texture re-upload skip
- Opt the process out of Windows power throttling (execution speed and timer resolution) at startup; NX2NAVI_POWER_FULL=0 turns it off. - Fence completion thread wakes waiters before collecting freed memory, so collection no longer delays them. - Add a by-region barrier when a draw or clear writes an attachment that an earlier draw in the same pass sampled; count it and inline uniform updates in the per-frame stats. - Hash small texture contents at upload and skip re-uploads whose bytes are unchanged (removes ~420 redundant uploads per frame in Kokiri Forest); NX2NAVI_TEX_SAME=0 turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -270,11 +270,15 @@ static void completion_main(void *arg) {
|
||||
plat_mutex_lock(&st_lock);
|
||||
}
|
||||
if (reached > done) {
|
||||
// The waiters go first (a fence wait, the frame's first submission, the acquire): freeing what the
|
||||
// finished submissions held (vk_mem_collect: upload batches, destroyed images, views and buffers, each
|
||||
// checked against the timeline itself) is nothing they read, and it takes cmd_lock, which the upload
|
||||
// path holds, so done waited behind uploads.
|
||||
__atomic_store_n(&done, reached, __ATOMIC_RELEASE);
|
||||
plat_cond_broadcast(&cv_done);
|
||||
plat_mutex_unlock(&st_lock);
|
||||
vk_mem_collect();
|
||||
plat_mutex_lock(&st_lock);
|
||||
__atomic_store_n(&done, reached, __ATOMIC_RELEASE);
|
||||
plat_cond_broadcast(&cv_done);
|
||||
}
|
||||
}
|
||||
plat_mutex_unlock(&st_lock);
|
||||
|
||||
Reference in New Issue
Block a user