Add timelineSempahore to mandatory ext features
authorAlexander Galazin <alexander.galazin@arm.com>
Mon, 28 Oct 2019 15:18:03 +0000 (16:18 +0100)
committerAlexander Galazin <alexander.galazin@arm.com>
Tue, 29 Oct 2019 08:07:54 +0000 (09:07 +0100)
https://gitlab.khronos.org/vulkan/vulkan/merge_requests/3421
clarifies that timelineSemaphore is mandatory for
implementations exposing VK_KHR_timeline_semaphore

This CL updates the test to align with the MR.

Components: Vulkan

Affects: dEQP-VK.api.info.device.mandatory_features

Change-Id: I12f9c9e6b05a77109cb0207b748cc9ccfa872d9b
(cherry picked from commit 33cc61974078e64d66e64ccf67ecc906f7a7f3fb)

external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl
external/vulkancts/scripts/src/mandatory_features.txt

index c782865..8c1031c 100644 (file)
@@ -76,6 +76,16 @@ bool checkMandatoryFeatures(const vkt::Context& context)
                nextPtr  = &physicalDeviceScalarBlockLayoutFeaturesEXT.pNext;
        }
 
+       vk::VkPhysicalDeviceTimelineSemaphoreFeaturesKHR physicalDeviceTimelineSemaphoreFeaturesKHR;
+       deMemset(&physicalDeviceTimelineSemaphoreFeaturesKHR, 0, sizeof(physicalDeviceTimelineSemaphoreFeaturesKHR));
+
+       if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_KHR_timeline_semaphore")) )
+       {
+               physicalDeviceTimelineSemaphoreFeaturesKHR.sType = getStructureType<VkPhysicalDeviceTimelineSemaphoreFeaturesKHR>();
+               *nextPtr = &physicalDeviceTimelineSemaphoreFeaturesKHR;
+               nextPtr  = &physicalDeviceTimelineSemaphoreFeaturesKHR.pNext;
+       }
+
        vk::VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR physicalDeviceUniformBufferStandardLayoutFeaturesKHR;
        deMemset(&physicalDeviceUniformBufferStandardLayoutFeaturesKHR, 0, sizeof(physicalDeviceUniformBufferStandardLayoutFeaturesKHR));
 
@@ -323,6 +333,15 @@ bool checkMandatoryFeatures(const vkt::Context& context)
                }
        }
 
+       if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_KHR_timeline_semaphore")) )
+       {
+               if ( physicalDeviceTimelineSemaphoreFeaturesKHR.timelineSemaphore == VK_FALSE )
+               {
+                       log << tcu::TestLog::Message << "Mandatory feature timelineSemaphore not supported" << tcu::TestLog::EndMessage;
+                       result = false;
+               }
+       }
+
        return result;
 }
 
index 0665b22..19e151c 100644 (file)
@@ -31,3 +31,4 @@ VkPhysicalDeviceInlineUniformBlockFeaturesEXT                 descriptorBindingInlineUniformBl
 VkPhysicalDeviceScalarBlockLayoutFeaturesEXT                   scalarBlockLayout                                                                       REQUIREMENTS ( VK_EXT_scalar_block_layout )
 VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR uniformBufferStandardLayout                                                     REQUIREMENTS ( VK_KHR_uniform_buffer_standard_layout )
 VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR        pipelineExecutableInfo                                                          REQUIREMENTS ( VK_KHR_pipeline_executable_properties )
+VkPhysicalDeviceTimelineSemaphoreFeaturesKHR                   timelineSemaphore                                                                       REQUIREMENTS ( VK_KHR_timeline_semaphore )