Fix buffer RAW hazards in synchronization tests
authorIgor Ostrowski <igor.ostrowski@intel.com>
Thu, 28 Feb 2019 16:15:12 +0000 (17:15 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 5 Mar 2019 10:57:05 +0000 (05:57 -0500)
Missing barrier for buffers in semaphore tests.

Affects:
dEQP-VK.synchronization.op.single_queue.semaphore.write_*_read_*.buffer_*

Components: Vulkan
VK-GL-CTS issue: 1633

Change-Id: I0f4ffed00e28816496948d8167e08bbbed999b79
(cherry picked from commit caef94e99677677cc1aec4a775c1cb757d53f221)

external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationSingleQueueTests.cpp

index bfd5bbb..6115d45 100644 (file)
@@ -235,6 +235,12 @@ public:
                                writeSync.imageLayout, readSync.imageLayout, m_resource->getImage().handle, m_resource->getImage().subresourceRange);
                        vk.cmdPipelineBarrier(cmdBuffers[WRITE],  writeSync.stageMask, readSync.stageMask, (VkDependencyFlags)0, 0u, (const VkMemoryBarrier*)DE_NULL, 0u, (const VkBufferMemoryBarrier*)DE_NULL, 1u, &barrier);
                }
+               else
+               {
+                       const VkBufferMemoryBarrier barrier = makeBufferMemoryBarrier(writeSync.accessMask, readSync.accessMask,
+                               m_resource->getBuffer().handle, 0, VK_WHOLE_SIZE);
+                       vk.cmdPipelineBarrier(cmdBuffers[WRITE],  writeSync.stageMask, readSync.stageMask, (VkDependencyFlags)0, 0u, (const VkMemoryBarrier*)DE_NULL, 1u, &barrier, 0u, (const VkImageMemoryBarrier*)DE_NULL);
+               }
 
                endCommandBuffer(vk, cmdBuffers[WRITE]);