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 <[email protected]>
This commit is contained in:
dustinspace217andDustinspace217 authored and GitHub committed 2026-11-04 18:20:02 +01:00
1 parent 32db880e94
commit b7e7949413
1 file changed
+3 -3
+3 -3
View File
@@ -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) {