From 7362cccee4d1e52f505ea89fa4b81e73752c6a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 12 Mar 2019 22:34:41 +0100 Subject: [PATCH] Vulkan subpass dependencies: Handle VK_IMAGE_LAYOUT_UNDEFINED without debug-asserting. --- ext/native/thin3d/VulkanQueueRunner.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/native/thin3d/VulkanQueueRunner.cpp b/ext/native/thin3d/VulkanQueueRunner.cpp index 4de46705be..9ca8d67efc 100644 --- a/ext/native/thin3d/VulkanQueueRunner.cpp +++ b/ext/native/thin3d/VulkanQueueRunner.cpp @@ -249,6 +249,9 @@ VkRenderPass VulkanQueueRunner::GetRenderPass(const RPKey &key) { VkSubpassDependency deps[2]{}; int numDeps = 0; switch (key.prevColorLayout) { + case VK_IMAGE_LAYOUT_UNDEFINED: + // No need to specify stage or access. + break; case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL: // Already the right color layout. Unclear that we need to do a lot here.. break; @@ -275,6 +278,9 @@ VkRenderPass VulkanQueueRunner::GetRenderPass(const RPKey &key) { } switch (key.prevDepthLayout) { + case VK_IMAGE_LAYOUT_UNDEFINED: + // No need to specify stage or access. + break; case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: // Already the right depth layout. Unclear that we need to do a lot here.. break;