Fix synchronisation in ycbcr tests
authorGraeme Leese <gleese@broadcom.com>
Fri, 21 Sep 2018 09:35:55 +0000 (10:35 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 27 Sep 2018 07:39:40 +0000 (03:39 -0400)
Components: Vulkan
Affects: dEQP-VK.ycbcr.*

Change-Id: Idfe7ef9cd0d5c8f9547c599631eae3bfcfa93e8a

external/vulkancts/modules/vulkan/ycbcr/vktYCbCrUtil.cpp

index 7413376390dcafe7af72e4c94dc01836523736bf..7c67c69dcb44ca1c06d3f5acb3bdbbcbef7e7a47 100644 (file)
@@ -403,7 +403,7 @@ void uploadImage (const DeviceInterface&            vkd,
 
                vkd.cmdPipelineBarrier(*cmdBuffer,
                                                                (VkPipelineStageFlags)VK_PIPELINE_STAGE_TRANSFER_BIT,
-                                                               (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
+                                                               (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
                                                                (VkDependencyFlags)0u,
                                                                0u,
                                                                (const VkMemoryBarrier*)DE_NULL,
@@ -482,7 +482,7 @@ void fillImageMemory (const vk::DeviceInterface&                                                    vkd,
 
                vkd.cmdPipelineBarrier(*cmdBuffer,
                                                                (VkPipelineStageFlags)VK_PIPELINE_STAGE_HOST_BIT,
-                                                               (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
+                                                               (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
                                                                (VkDependencyFlags)0u,
                                                                0u,
                                                                (const VkMemoryBarrier*)DE_NULL,
@@ -572,7 +572,7 @@ void downloadImage (const DeviceInterface&  vkd,
                                makeExtent3D(planeW, planeH, 1u),
                        };
 
-                       vkd.cmdCopyImageToBuffer(*cmdBuffer, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, **stagingBuffers[planeNdx], 1u, &copy);
+                       vkd.cmdCopyImageToBuffer(*cmdBuffer, image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, **stagingBuffers[planeNdx], 1u, &copy);
                }
                {
                        const VkBufferMemoryBarrier             postCopyBarrier =
@@ -590,7 +590,7 @@ void downloadImage (const DeviceInterface&  vkd,
 
                        vkd.cmdPipelineBarrier(*cmdBuffer,
                                                                        (VkPipelineStageFlags)VK_PIPELINE_STAGE_TRANSFER_BIT,
-                                                                       (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
+                                                                       (VkPipelineStageFlags)VK_PIPELINE_STAGE_HOST_BIT,
                                                                        (VkDependencyFlags)0u,
                                                                        0u,
                                                                        (const VkMemoryBarrier*)DE_NULL,
@@ -640,8 +640,8 @@ void readImageMemory (const vk::DeviceInterface&                                                    vkd,
                };
 
                vkd.cmdPipelineBarrier(*cmdBuffer,
+                                                               (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
                                                                (VkPipelineStageFlags)VK_PIPELINE_STAGE_HOST_BIT,
-                                                               (VkPipelineStageFlags)VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
                                                                (VkDependencyFlags)0u,
                                                                0u,
                                                                (const VkMemoryBarrier*)DE_NULL,