mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 10:09:59 -04:00
Free what DLSS and FSR hold some presents after the upscaler is switched off, and the HUD-less picture once frame generation is off.
Switched off in the menu or failed, the upscaler kept everything it had made for the process: per scene size its output, motion vector, mask and sharpening images and a DLSS feature (81 MiB of images at 2560x1440 with DLAA, 182 MiB at 2160 lines, and about 0.5 GB per DLSS feature), the reactive mask's snapshots, the HUD-less pair and the FSR 3.1 and FSR 4 upscale contexts. Eight presents after it goes off they are freed on the replay thread, which makes every evaluation, after a wait for the device to be idle, as the code already does for a size it replaces. Switched on again, it makes them anew with a new history, as any switch on does. The HUD-less picture was made and copied every frame, and kept, after frame generation went off, since the flag that asks for it was never cleared on Windows: the frame generator's release clears it now, and the pair goes once no frame generation swapchain is up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,9 @@ int vk_ffx_framegen_available(void);
|
||||
int vk_ffx_upscale(VkCommandBuffer cb, const VkFfxImage *color, const VkFfxImage *depth, const VkFfxImage *mv,
|
||||
const VkFfxImage *out, float jx, float jy, int reset, float dt_ms, const VkFfxCamera *cam);
|
||||
void vk_ffx_release(void); // before the device goes away
|
||||
// The upscale contexts of FSR 3.1 and FSR 4 (vk_dlaa.c retire_idle, the device idle): any held, and give them back.
|
||||
int vk_ffx_holds(void);
|
||||
void vk_ffx_release_idle(void);
|
||||
// FSR 3.1's contexts that no upscale used in the last `recent` calls, destroyed with the device idle (the caller waited
|
||||
// for it): room for an FSR 4 context whose creation failed. Their count.
|
||||
int vk_ffx_trim_idle(uint64_t recent);
|
||||
@@ -47,6 +50,7 @@ int vk_ffx4_upscale(VkCommandBuffer cb, const VkFfxImage *color, const VkFfxImag
|
||||
const VkFfxImage *out, float jx, float jy, int reset, float dt_ms,
|
||||
const VkFfxCamera *cam); // as vk_ffx_upscale
|
||||
void vk_ffx4_release(void);
|
||||
int vk_ffx4_holds(void); // an FSR 4 upscale context is made
|
||||
int vk_ffx4_failed(void); // it failed three times in a row: FSR 3.1 serves until vk_ffx4_retry
|
||||
void vk_ffx4_retry(void); // the menu chose FSR 4 again: try it anew after such failures
|
||||
void vk_ffx4_trim(uint64_t now_ns); // at each upscale: FSR 4's contexts unused for a while go
|
||||
|
||||
Reference in New Issue
Block a user