mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Keep the prebloom images' last use when they are made again for another picture size.
vk_dlaa.c pb_images noted the present count in PB.used and then, for a new picture size, pb_destroy cleared the whole struct with the old images, PB.used with it. The new images were made with PB.used 0, so at the next present idle_release took them for 600 presents unused (once the run was 600 presents old) and destroyed them without a wait for the GPU, while the frame that had just drawn into them could still be in flight; the frame after made them again. With dlss_prebloom = 1 (off by default) that happened at every change of the picture's size, with the log line "prebloom: the picture-size images went unused for 600 presents: freed" right after it. PB.used is now set again once the new images are made. Not reproduced before the change (found by reading the code). Every runtime file compiles, vk_dlaa.c with -Wall -Wextra and no warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2633,7 +2633,9 @@ static int pb_images(VkCommandBuffer cb, uint32_t w, uint32_t h) {
|
||||
VkDependencyInfo di = {.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, .imageMemoryBarrierCount = 2,
|
||||
.pImageMemoryBarriers = ib};
|
||||
vkCmdPipelineBarrier2(cb, &di);
|
||||
PB.w = w, PB.h = h;
|
||||
// used again: pb_destroy above cleared it with the old images, and idle_release took the new ones, which this frame
|
||||
// uses, for 600 presents unused and freed them at the next present, without a wait for the GPU
|
||||
PB.w = w, PB.h = h, PB.used = D.presents;
|
||||
rt_log("dlaa: prebloom: the passes after the upscaler draw at %ux%u (two B10G11R11 images, %.0f MiB)", w, h,
|
||||
2.0 * w * h * 4 / 1048576.0);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user