From b7e7949413b22976824b088917a6093d1e402f1e Mon Sep 17 00:00:00 2001 From: dustinspace217 Date: Wed, 4 Nov 2026 09:20:02 -0800 Subject: [PATCH] Vulkan: keep the swap chain pass open when irradiance setup fails (#7938) vulkan_calculate_irrmap ended the swap chain render pass first and then had four early returns (pipeline, UBO create, UBO allocate, UBO map) before resumeSwapChainPass, so any of those failures left the rest of the frame recording draws outside a render pass. End the pass only after the setup that can fail. Co-authored-by: Dustinspace217 --- code/graphics/vulkan/VulkanDrawAPI.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/graphics/vulkan/VulkanDrawAPI.cpp b/code/graphics/vulkan/VulkanDrawAPI.cpp index 9ed7edee86..162b67bf2d 100644 --- a/code/graphics/vulkan/VulkanDrawAPI.cpp +++ b/code/graphics/vulkan/VulkanDrawAPI.cpp @@ -640,9 +640,6 @@ void vulkan_calculate_irrmap() vk::CommandBuffer cmd = stateTracker->getCommandBuffer(); - // End the current swap chain render pass - cmd.endRenderPass(); - // Create pipeline for irradiance map generation PipelineConfig config; config.shaderType = SDR_TYPE_IRRADIANCE_MAP_GEN; @@ -713,6 +710,9 @@ void vulkan_calculate_irrmap() vk::Extent2D irrExtent(irrTs->width, irrTs->height); + // End the swap chain pass only after the early returns above, which never resume it + cmd.endRenderPass(); + for (size_t face = 0; face < irrTs->cubeFaceFramebuffers.size(); face++) { vk::Framebuffer fb = irrTs->cubeFaceFramebuffers[face]; if (!fb) {