mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 10:49:58 -04:00
Add a per-frame texture work log line and two ASTC upload changes, all off by default.
texup_log_ms logs a "texup:" line for each frame whose texture work on the render or replay thread reaches that many milliseconds. The line splits the time into texture creation, staging, storage copies, ASTC recording, scratch buffers and new device memory, to show where an area load's hitch goes. astc_scratch_keep keeps the ASTC decoder's scratch buffer across upload batches instead of making a new 64 MiB buffer for each batch. astc_arena stages GPU-decoded ASTC blocks in the staging arena instead of a buffer per texture. Both aim at the allocation churn seen during area loads and stay off until a play test measures them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,10 @@ static void VKAPI_PTR on_allocate(VmaAllocator a, uint32_t type, VkDeviceMemory
|
||||
plat_inc64(&H.made);
|
||||
return;
|
||||
}
|
||||
if (size >= 32ull << 20) plat_inc64(&H.other);
|
||||
if (size >= 32ull << 20) {
|
||||
plat_inc64(&H.other);
|
||||
vk_texstat_add(VK_TS_DEVMEM, 1, size); // counted when the render or replay thread made it
|
||||
}
|
||||
plat_or64(&H.types, (int64_t)(1ull << type));
|
||||
plat_event_set(&H.ev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user