Check for required features in memory model tests
authorChris Forbes <chrisforbes@google.com>
Thu, 16 May 2019 00:18:47 +0000 (17:18 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 22 May 2019 06:36:42 +0000 (02:36 -0400)
All of these tests expect to be able to write to storage buffers; check
for the vertexPipelineStoresAndAtomics or fragmentStoresAndAtomics
features as appropriate.

VK-GL-CTS Issue: 1777
Components: Vulkan
Affects: dEQP-VK.memory_model.*

Change-Id: I51adeda82ba7af22368c239a6abfc481479700f1

external/vulkancts/modules/vulkan/memory_model/vktMemoryModelMessagePassing.cpp

index ecef086..093088d 100644 (file)
@@ -223,6 +223,20 @@ void MemoryModelTestCase::checkSupport(Context& context) const
                        TCU_THROW(NotSupportedError, "64-bit integer shared atomics not supported");
                }
        }
+       if (m_data.stage == STAGE_VERTEX)
+       {
+               if (!context.getDeviceFeatures().vertexPipelineStoresAndAtomics)
+               {
+                       TCU_THROW(NotSupportedError, "vertexPipelineStoresAndAtomics not supported");
+               }
+       }
+       if (m_data.stage == STAGE_FRAGMENT)
+       {
+               if (!context.getDeviceFeatures().fragmentStoresAndAtomics)
+               {
+                       TCU_THROW(NotSupportedError, "fragmentStoresAndAtomics not supported");
+               }
+       }
 }