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:
chrg6
2026-11-13 00:44:01 -05:00
parent ad58dfcddb
commit c7de484a72
5 changed files with 82 additions and 0 deletions

View File

@@ -431,6 +431,20 @@ extern "C" ffxReturnCode_t vk_ffx_dispatch(ffxContext *ctx, const ffxDispatchDes
return A.ok ? A.dispatch(ctx, desc) : FFX_API_RETURN_ERROR;
}
// The upscaler is off (vk_dlaa.c retire_idle; the device is idle): FSR 3.1's and FSR 4's upscale contexts go, made again
// at the next upscale. Frame generation's contexts are not these.
extern "C" int vk_ffx_holds(void) {
for (Up &u : U)
if (u.ctx) return 1;
return vk_ffx4_holds();
}
extern "C" void vk_ffx_release_idle(void) {
vk_ffx4_release();
if (!A.ok) return;
for (Up &u : U)
if (u.ctx) destroy_up(&u, "the upscaler is off");
}
extern "C" void vk_ffx_release(void) {
vk_ffx4_release();
if (!A.ok) return;