From acbe3e5923cac560b3e8af1e80bf78115acb58ed Mon Sep 17 00:00:00 2001 From: Alexander Galazin Date: Mon, 28 Oct 2019 16:18:03 +0100 Subject: [PATCH] Add timelineSempahore to mandatory ext features 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) --- .../framework/vulkan/vkMandatoryFeatures.inl | 19 +++++++++++++++++++ external/vulkancts/scripts/src/mandatory_features.txt | 1 + 2 files changed, 20 insertions(+) diff --git a/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl b/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl index c782865..8c1031c 100644 --- a/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl +++ b/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl @@ -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(); + *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; } diff --git a/external/vulkancts/scripts/src/mandatory_features.txt b/external/vulkancts/scripts/src/mandatory_features.txt index 0665b22..19e151c 100644 --- a/external/vulkancts/scripts/src/mandatory_features.txt +++ b/external/vulkancts/scripts/src/mandatory_features.txt @@ -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 ) -- 2.7.4