mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
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:
1 parent
32db880e94
commit
b7e7949413
1 file changed
+3
-3
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user