From: Mikko Rasa Date: Thu, 1 Sep 2022 19:32:37 +0000 (+0300) Subject: Use correct to_present flag when creating framebuffers and pipelines X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=98f72f1666f45fa96407c96ff2bb88a5962e66c9;p=libs%2Fgl.git Use correct to_present flag when creating framebuffers and pipelines After a recent update validation layers started complaining about incompatible render passes because subpass dependencies did not match. --- diff --git a/source/backends/vulkan/framebuffer_backend.cpp b/source/backends/vulkan/framebuffer_backend.cpp index 4c68546f..8f82f3f1 100644 --- a/source/backends/vulkan/framebuffer_backend.cpp +++ b/source/backends/vulkan/framebuffer_backend.cpp @@ -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 = { }; diff --git a/source/backends/vulkan/pipelinestate_backend.cpp b/source/backends/vulkan/pipelinestate_backend.cpp index 9c695b3d..ab5d3dd4 100644 --- a/source/backends/vulkan/pipelinestate_backend.cpp +++ b/source/backends/vulkan/pipelinestate_backend.cpp @@ -166,6 +166,7 @@ void VulkanPipelineState::fill_graphics_creation_info(vector &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;