]> git.tdb.fi Git - libs/gl.git/commitdiff
Use correct to_present flag when creating framebuffers and pipelines
authorMikko Rasa <tdb@tdb.fi>
Thu, 1 Sep 2022 19:32:37 +0000 (22:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 1 Sep 2022 19:32:37 +0000 (22:32 +0300)
After a recent update validation layers started complaining about
incompatible render passes because subpass dependencies did not match.

source/backends/vulkan/framebuffer_backend.cpp
source/backends/vulkan/pipelinestate_backend.cpp

index 4c68546f15ed322181aad3ef9c136f92c9892ff3..8f82f3f1be634458e04df7f0c41ef38bc20c843e 100644 (file)
@@ -130,6 +130,7 @@ void VulkanFramebuffer::update(unsigned mask) const
 
        RenderPass render_pass;
        render_pass.framebuffer = &self;
+       render_pass.to_present = is_presentable();
        render_pass.update(device);
 
        VkFramebufferCreateInfo framebuffer_info = { };
index 9c695b3d1a5d281abda8ccc0d8a2df4b1e60b775..ab5d3dd4cd8ca10a20342eb1b063a0c29c92b8bf 100644 (file)
@@ -166,6 +166,7 @@ void VulkanPipelineState::fill_graphics_creation_info(vector<char> &buffer) cons
        const FrameFormat &format = self.framebuffer->get_format();
        RenderPass render_pass;
        render_pass.framebuffer = self.framebuffer;
+       render_pass.to_present = self.framebuffer->is_presentable();
        render_pass.update(device);
 
        unsigned n_color_attachments = 0;