Vulkan: Allow pre-transition from undefined.

This seems like it can happen when download/upload operations break up a
render, and happens now with dumps using the display at the right timing.
This commit is contained in:
Unknown W. Brackets 2018-11-17 09:59:39 -08:00
parent 79d16f7b9f
commit caf5bb2789

View File

@ -689,6 +689,7 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
VkPipelineStageFlags dstStage{};
switch (barrier.oldLayout) {
case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL:
case VK_IMAGE_LAYOUT_UNDEFINED:
barrier.srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT;
srcStage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
break;