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 c782865cad97d1b4871ffb779a443dff487c8da7..8c1031c0ab2c2f204ebb1f958b83dd5eab99690f 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 0665b2292b4c4ece94f6e7bb4e9fa9590808af51..19e151ce6064d9856240bc2b399c1b3764452efb 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 )