Fix RAW and WAW hazards in pipeline barrier tests.
authorIgor Ostrowski <igor.ostrowski@intel.com>
Fri, 15 Feb 2019 14:33:42 +0000 (15:33 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 27 Feb 2019 11:54:01 +0000 (06:54 -0500)
Test was not handling correctly internal state of the visibility and availability operations.
Both access scopes of the barrier must be set correctly to unlock such usage of the resource.

Affects:
dEQP-VK.memory.pipeline_barrier.*

Components: Vulkan
VK-GL-CTS issue: 1589

Change-Id: I7a778dbee8109f060b88beee625ca15de01c7364

external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp

index 1eb9a46..67f3265 100644 (file)
@@ -8215,7 +8215,7 @@ void getAvailableOps (const State& state, bool supportsBuffers, bool supportsIma
                {
                        ops.push_back(OP_PIPELINE_BARRIER_GLOBAL);
 
-                       if (state.hasImage)
+                       if (state.hasImage && (state.imageLayout != vk::VK_IMAGE_LAYOUT_UNDEFINED))
                                ops.push_back(OP_PIPELINE_BARRIER_IMAGE);
 
                        if (state.hasBuffer)