From 9abe2e5d574041a08a54fcab20bf75361991484c Mon Sep 17 00:00:00 2001 From: Sergey Kosarevsky Date: Wed, 27 Sep 2023 14:23:33 -0700 Subject: [PATCH] igl | vulkan | More stages handled in transitionLayout() Summary: More pipeline stages are handled in `transitionLayout()`. Reviewed By: pixelperfect3 Differential Revision: D49659344 fbshipit-source-id: 83e0ea37d26226f819c7ef82b09c079d72fc5680 --- src/igl/vulkan/VulkanImage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/igl/vulkan/VulkanImage.cpp b/src/igl/vulkan/VulkanImage.cpp index a26a91c03c..9a367b0036 100644 --- a/src/igl/vulkan/VulkanImage.cpp +++ b/src/igl/vulkan/VulkanImage.cpp @@ -663,6 +663,7 @@ void VulkanImage::transitionLayout(VkCommandBuffer cmdBuf, case VK_PIPELINE_STAGE_TRANSFER_BIT: case VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT: case VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT: + case VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT: break; default: IGL_ASSERT_MSG( @@ -679,9 +680,11 @@ void VulkanImage::transitionLayout(VkCommandBuffer cmdBuf, srcAccessMask |= VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; } if (srcStageMask & VK_PIPELINE_STAGE_TRANSFER_BIT) { + srcAccessMask |= VK_ACCESS_TRANSFER_READ_BIT; srcAccessMask |= VK_ACCESS_TRANSFER_WRITE_BIT; } if (srcStageMask & VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT) { + srcAccessMask |= VK_ACCESS_SHADER_READ_BIT; srcAccessMask |= VK_ACCESS_SHADER_WRITE_BIT; } if (srcStageMask & VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT) {