Reword the comment on pb_images' last PB.used, which still described the clear 9071dfc3 removed.

The review of 9071dfc3 found the comment stale: it said the new prebloom images were left at PB.used 0 by a clear of
the old ones, but retire_pb now keeps PB.used, and the PB.used = D.presents at the top of pb_images already covers the
new images on that path. The assignment after the images are made stays as the guard against any clear of PB before
it (pb_destroy would zero PB.used), which upscaler_idle_check holds. The comment now says that. A comment only: the
code is unchanged.

The review also noted that 77756b21 alone left a window between pb_destroy and that assignment in which PB.scene was
set with PB.used 0; 9071dfc3, where retire_pb takes pb_destroy's place on that path, closes it, so nothing changes
here for it.

Checks that passed: upscaler_idle_check, tools/check_content.py --staged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 19:37:13 -05:00
parent 74bedbee73
commit bede842db7

View File

@@ -2838,8 +2838,8 @@ 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);
// used again for the new images, which this frame uses: left at 0 by a clear of the old ones, idle_release took
// them for 600 presents unused and freed them at the next present, without a wait for the GPU
// noted again once the new images exist, after any clear of PB above (retire_pb keeps it, pb_destroy would not):
// at 0, idle_release takes images this frame draws into for 600 presents unused and frees them at the next present
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);