diff --git a/src/igl/vulkan/VulkanStagingDevice.cpp b/src/igl/vulkan/VulkanStagingDevice.cpp index bfcdf1526f..7076be37c4 100644 --- a/src/igl/vulkan/VulkanStagingDevice.cpp +++ b/src/igl/vulkan/VulkanStagingDevice.cpp @@ -205,7 +205,7 @@ void VulkanStagingDevice::imageData(VulkanImage& image, ivkImageMemoryBarrier(wrapper.cmdBuf_, image.getVkImage(), 0, - VK_ACCESS_TRANSFER_WRITE_BIT, + VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, @@ -226,7 +226,7 @@ void VulkanStagingDevice::imageData(VulkanImage& image, // 3. Transition TRANSFER_DST_OPTIMAL into SHADER_READ_ONLY_OPTIMAL ivkImageMemoryBarrier(wrapper.cmdBuf_, image.getVkImage(), - VK_ACCESS_TRANSFER_READ_BIT, // VK_ACCESS_TRANSFER_WRITE_BIT, + VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,