From bc6027ebafddeec64c3a582178bd699931af58f8 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 15 Jun 2023 08:39:35 +0200 Subject: [PATCH] Vulkan: Initial/Final Renderpass Layout Until now the initial renderpass layout wasn't set, resulting in errors/warnings when using the renderpass. This PR sets the initial and final renderpass to general so the code knows what to expect. In future this needs to be designed better as the layout will change when used in as a framebuffer attachment, or presenting on the screen. Pull Request: https://projects.blender.org/blender/blender/pulls/109000 --- intern/ghost/intern/GHOST_ContextVK.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/ghost/intern/GHOST_ContextVK.cc b/intern/ghost/intern/GHOST_ContextVK.cc index bf14f32aba1..6f1e3767c06 100644 --- a/intern/ghost/intern/GHOST_ContextVK.cc +++ b/intern/ghost/intern/GHOST_ContextVK.cc @@ -712,8 +712,8 @@ static GHOST_TSuccess create_render_pass(VkDevice device, colorAttachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE; colorAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; colorAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; - colorAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - colorAttachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + colorAttachment.initialLayout = VK_IMAGE_LAYOUT_GENERAL; + colorAttachment.finalLayout = VK_IMAGE_LAYOUT_GENERAL; VkAttachmentReference colorAttachmentRef = {}; colorAttachmentRef.attachment = 0;