]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/framebuffer_backend.cpp
Store the number of mipmap levels in the Texture base class
[libs/gl.git] / source / backends / vulkan / framebuffer_backend.cpp
index 96653fe1d084444b625297cd9651ff2dea0f8b90..8ef69ecd72a206c87db8b3997afecc250d7dc063 100644 (file)
@@ -82,6 +82,12 @@ void VulkanFramebuffer::update(unsigned) const
                set_vulkan_object_name();
 }
 
+void VulkanFramebuffer::prepare_image_layouts(bool discard) const
+{
+       for(const Framebuffer::Attachment &a: static_cast<const Framebuffer *>(this)->attachments)
+               a.tex->change_layout(a.level, get_vulkan_attachment_layout(get_components(a.tex->get_format())), discard);
+}
+
 void VulkanFramebuffer::set_debug_name(const string &name)
 {
 #ifdef DEBUG