mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 18:09:58 -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:
@@ -474,6 +474,7 @@ uint64_t plat_counter_hz(void) { return 1000000000u; }
|
||||
// The timer slack (50 us by default) is how late the kernel may wake a sleeping thread to batch wakeups. New threads
|
||||
// inherit it from the thread that creates them.
|
||||
void plat_timer_1ms(void) { prctl(PR_SET_TIMERSLACK, 1000ul, 0, 0, 0); }
|
||||
int plat_power_full(void) { return 0; } // no per-process power throttling to opt out of
|
||||
|
||||
// clock_nanosleep wakes within the timer slack (50 us by default) of its deadline; the last PLAT_SPIN_NS are spent
|
||||
// yielding so the deadline is met closely, as on Windows.
|
||||
|
||||
Reference in New Issue
Block a user