mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 12:59:58 -04:00
Free the images of HDR, FSR 1 and SMAA once they are no longer used, instead of keeping them for the process.
Each made its images at the picture's or the scene's size the first time it ran and kept them until the process ended, also after the menu switched it off: - the HDR encode's picture and menu image (28 and 14 MiB at 2560x1440, 63 and 32 MiB at 2160 lines) now go when the swapchain is made without HDR, after a wait for the presents that may still read them; - FSR 1's two images (56 MiB, 127 MiB at 2160 lines) go after 300 presents it did not scale, with the same wait; - SMAA's three work images (35 MiB, 79 MiB at 2160 lines) go after 600 frames of another anti-aliasing, deferred past the submission being recorded. Each makes them anew when it runs again; one log line says when they go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -432,6 +432,7 @@ static int create_swapchain(void) {
|
||||
VkSurfaceFormatKHR sf = fmts[0];
|
||||
g_sc_hdr_wanted = vk_hdr_wanted();
|
||||
int hdr = g_sc_hdr_wanted && vk_hdr_surface_format(fmts, nf, &sf), found = hdr;
|
||||
if (!hdr) vk_hdr_images_release(); // HDR off, or not on this display: what its encode made goes
|
||||
for (uint32_t i = 0; i < nf && !found; i++)
|
||||
if (fmts[i].format == VK_FORMAT_B8G8R8A8_UNORM && fmts[i].colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) { sf = fmts[i]; found = 1; }
|
||||
for (uint32_t i = 0; i < nf && !found; i++)
|
||||
|
||||
Reference in New Issue
Block a user