From bc50e8ce8976c2c474ec26720087dcc45f5c0435 Mon Sep 17 00:00:00 2001 From: Piotr Byszewski Date: Tue, 15 Oct 2019 11:06:51 +0200 Subject: [PATCH] Check available functionality with context method This change adds Context::isDeviceFunctionalitySupported and Context::isInstanceFunctionalitySupported methods that replace isDeviceExtensionSupported/isInstanceExtensionSupported. Components: Framework VK-GL-CTS issue: 2005 Affects: dEQP-VK.* Change-Id: If796fc31fe6e769495cdf1ccefa4ae8192caf2b5 --- .../framework/vulkan/vkDeviceFeatures.cpp | 7 +- .../framework/vulkan/vkMandatoryFeatures.inl | 2 +- .../vulkancts/framework/vulkan/vkQueryUtil.cpp | 41 ++-------- .../vulkancts/framework/vulkan/vkQueryUtil.hpp | 4 +- .../api/vktApiBufferAndImageAllocationUtil.cpp | 12 +-- .../modules/vulkan/api/vktApiBufferTests.cpp | 6 +- .../vulkan/api/vktApiBufferViewCreateTests.cpp | 4 +- .../vulkan/api/vktApiCommandBuffersTests.cpp | 2 +- .../vulkan/api/vktApiCopiesAndBlittingTests.cpp | 4 +- .../vulkan/api/vktApiDescriptorPoolTests.cpp | 2 +- .../vulkan/api/vktApiDescriptorSetTests.cpp | 2 +- .../vulkan/api/vktApiDriverPropertiesTests.cpp | 2 +- .../modules/vulkan/api/vktApiFeatureInfo.cpp | 22 ++--- .../vulkan/api/vktApiImageClearingTests.cpp | 2 +- .../modules/vulkan/api/vktApiMaintenance3Check.cpp | 7 +- .../api/vktApiMemoryRequirementInvarianceTests.cpp | 5 +- .../vulkan/api/vktApiObjectManagementTests.cpp | 13 +-- .../vktBindingBufferDeviceAddressTests.cpp | 4 +- .../vktBindingDescriptorSetRandomTests.cpp | 95 ++++++++++------------ .../modules/vulkan/clipping/vktClippingTests.cpp | 2 +- .../vktConditionalDrawAndClearTests.cpp | 2 +- .../vktConditionalRenderingTestUtil.cpp | 2 +- .../vktDescriptorSetsIndexingTests.cpp | 2 +- .../device_group/vktDeviceGroupRendering.cpp | 6 +- .../vulkan/draw/vktDrawDiscardRectanglesTests.cpp | 2 +- .../modules/vulkan/draw/vktDrawIndirectTest.cpp | 2 +- .../modules/vulkan/draw/vktDrawInstancedTests.cpp | 4 +- .../draw/vktDrawInvertedDepthRangesTests.cpp | 2 +- .../draw/vktDrawNegativeViewportHeightTests.cpp | 2 +- .../draw/vktDrawShaderDrawParametersTests.cpp | 2 +- .../vulkan/draw/vktDrawShaderLayerTests.cpp | 2 +- .../draw/vktDrawShaderViewportIndexTests.cpp | 2 +- .../vktFragmentShaderInterlockBasic.cpp | 2 +- .../geometry/vktGeometryLayeredRenderingTests.cpp | 2 +- .../vktImageCompressionTranscodingSupport.cpp | 2 +- .../vulkan/image/vktImageLoadStoreTests.cpp | 2 +- .../modules/vulkan/image/vktImageMutableTests.cpp | 6 +- .../image/vktImageTranscodingSupportTests.cpp | 2 +- .../vktImagelessFramebufferTests.cpp | 4 +- .../vulkan/memory/vktMemoryBindingTests.cpp | 2 +- .../memory/vktMemoryExternalMemoryHostTests.cpp | 2 +- .../vulkan/memory/vktMemoryMappingTests.cpp | 2 +- .../vulkan/memory/vktMemoryRequirementsTests.cpp | 21 +++-- .../vulkan/multiview/vktMultiViewRenderTests.cpp | 4 +- .../pipeline/vktPipelineCreationFeedbackTests.cpp | 2 +- .../vktPipelineDepthRangeUnrestrictedTests.cpp | 2 +- .../vktPipelineExecutablePropertiesTests.cpp | 2 +- .../pipeline/vktPipelineImageSamplingInstance.cpp | 10 +-- .../pipeline/vktPipelineInputAssemblyTests.cpp | 2 +- ...tPipelineMultisampleSampleLocationsExtTests.cpp | 2 +- .../pipeline/vktPipelineMultisampleTests.cpp | 2 +- .../pipeline/vktPipelineRenderToImageTests.cpp | 6 +- .../pipeline/vktPipelineStencilExportTests.cpp | 2 +- .../vulkan/pipeline/vktPipelineTimestampTests.cpp | 4 +- .../protected_memory/vktProtectedMemUtils.cpp | 15 +++- .../query_pool/vktQueryPoolOcclusionTests.cpp | 4 +- .../query_pool/vktQueryPoolStatisticsTests.cpp | 2 +- .../vulkan/rasterization/vktRasterizationTests.cpp | 2 +- .../vktRenderPassDepthStencilResolveTests.cpp | 2 +- .../vktRenderPassMultisampleResolveTests.cpp | 2 +- .../renderpass/vktRenderPassMultisampleTests.cpp | 6 +- .../renderpass/vktRenderPassSampleReadTests.cpp | 2 +- .../vktRenderPassSparseRenderTargetTests.cpp | 2 +- .../vktRenderPassSubpassDependencyTests.cpp | 8 +- .../vulkan/renderpass/vktRenderPassTests.cpp | 8 +- .../vktRenderPassUnusedAttachmentTests.cpp | 2 +- .../vktRenderPassUnusedClearAttachmentTests.cpp | 2 +- ...RobustBufferAccessWithVariablePointersTests.cpp | 13 ++- .../shaderexecutor/vktAtomicOperationTests.cpp | 2 +- .../shaderexecutor/vktOpaqueTypeIndexingTests.cpp | 2 +- .../vulkan/shaderexecutor/vktShaderClockTests.cpp | 2 +- .../spirv_assembly/vktSpvAsmFloatControlsTests.cpp | 3 +- .../vulkan/spirv_assembly/vktSpvAsmUtils.cpp | 3 +- .../modules/vulkan/ssbo/vktSSBOLayoutCase.cpp | 2 +- .../subgroups/vktSubgroupsBallotBroadcastTests.cpp | 2 +- .../subgroups/vktSubgroupsBallotMasksTests.cpp | 2 +- .../vulkan/subgroups/vktSubgroupsBallotTests.cpp | 2 +- .../vulkan/subgroups/vktSubgroupsTestsUtils.cpp | 4 +- .../vulkan/subgroups/vktSubgroupsVoteTests.cpp | 4 +- ...vktSynchronizationCrossInstanceSharingTests.cpp | 22 ++--- .../vktSynchronizationOperation.cpp | 16 ++-- .../vktSynchronizationOperation.hpp | 7 +- .../vktSynchronizationWin32KeyedMutexTests.cpp | 2 +- .../tessellation/vktTessellationWindingTests.cpp | 2 +- .../vktTransformFeedbackSimpleTests.cpp | 4 +- .../modules/vulkan/vktCustomInstancesDevices.cpp | 2 +- external/vulkancts/modules/vulkan/vktTestCase.cpp | 27 +++++- external/vulkancts/modules/vulkan/vktTestCase.hpp | 7 +- .../vulkancts/modules/vulkan/vktTestPackage.cpp | 2 +- .../modules/vulkan/wsi/vktWsiSurfaceTests.cpp | 5 +- .../modules/vulkan/wsi/vktWsiSwapchainTests.cpp | 10 +-- .../vulkan/ycbcr/vktYCbCrConversionTests.cpp | 2 +- .../modules/vulkan/ycbcr/vktYCbCrFormatTests.cpp | 2 +- .../modules/vulkan/ycbcr/vktYCbCrUtil.cpp | 6 +- external/vulkancts/scripts/gen_framework.py | 2 +- 95 files changed, 268 insertions(+), 301 deletions(-) diff --git a/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp b/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp index b403cb6..520423e 100644 --- a/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp +++ b/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp @@ -26,11 +26,6 @@ namespace vk { -static bool isPhysicalDeviceFeatures2Supported (const deUint32 version, const std::vector& instanceExtensions) -{ - return isInstanceExtensionSupported(version, instanceExtensions, "VK_KHR_get_physical_device_properties2"); -} - DeviceFeatures::DeviceFeatures (const InstanceInterface& vki, const deUint32 apiVersion, const VkPhysicalDevice physicalDevice, @@ -40,7 +35,7 @@ DeviceFeatures::DeviceFeatures (const InstanceInterface& vki, deMemset(&m_coreFeatures2, 0, sizeof(m_coreFeatures2)); m_coreFeatures2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; - if (isPhysicalDeviceFeatures2Supported(apiVersion, instanceExtensions)) + if (isInstanceExtensionSupported(apiVersion, instanceExtensions, "VK_KHR_get_physical_device_properties2")) { const std::vector deviceExtensionProperties = enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL); void** nextPtr = &m_coreFeatures2.pNext; diff --git a/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl b/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl index c782865..5a0eb84 100644 --- a/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl +++ b/external/vulkancts/framework/vulkan/vkMandatoryFeatures.inl @@ -3,7 +3,7 @@ */ bool checkMandatoryFeatures(const vkt::Context& context) { - if ( !vk::isInstanceExtensionSupported(context.getUsedApiVersion(), context.getInstanceExtensions(), "VK_KHR_get_physical_device_properties2") ) + if ( !context.isInstanceFunctionalitySupported("VK_KHR_get_physical_device_properties2") ) TCU_THROW(NotSupportedError, "Extension VK_KHR_get_physical_device_properties2 is not present"); VkPhysicalDevice physicalDevice = context.getPhysicalDevice(); diff --git a/external/vulkancts/framework/vulkan/vkQueryUtil.cpp b/external/vulkancts/framework/vulkan/vkQueryUtil.cpp index 717d889..8f7be39 100644 --- a/external/vulkancts/framework/vulkan/vkQueryUtil.cpp +++ b/external/vulkancts/framework/vulkan/vkQueryUtil.cpp @@ -403,38 +403,6 @@ bool isCompatible (const VkLayerProperties& layerProperties, const RequiredLayer return true; } -bool isInstanceExtensionSupported (const deUint32 instanceVersion, const std::vector& extensions, const std::string& required) -{ - if (isCoreInstanceExtension(instanceVersion, required)) - return true; - else - return de::contains(extensions.begin(), extensions.end(), required); -} - -bool isDeviceExtensionSupported (const deUint32 deviceVersion, const std::vector& extensions, const std::string& required) -{ - if (isCoreDeviceExtension(deviceVersion, required)) - return true; - else - return de::contains(extensions.begin(), extensions.end(), required); -} - -bool isInstanceExtensionSupported (const deUint32 instanceVersion, const std::vector& extensions, const RequiredExtension& required) -{ - if (isCoreInstanceExtension(instanceVersion, required.name)) - return true; - else - return isExtensionSupported(extensions.begin(), extensions.end(), required); -} - -bool isDeviceExtensionSupported (const deUint32 deviceVersion, const std::vector& extensions, const RequiredExtension& required) -{ - if (isCoreDeviceExtension(deviceVersion, required.name)) - return true; - else - return isExtensionSupported(extensions.begin(), extensions.end(), required); -} - bool isExtensionSupported (const std::vector& extensions, const RequiredExtension& required) { return isExtensionSupported(extensions.begin(), extensions.end(), required); @@ -445,6 +413,15 @@ bool isExtensionSupported (const vector& extensionStrings, const st return de::contains(extensionStrings.begin(), extensionStrings.end(), extensionName); } +bool isInstanceExtensionSupported(const deUint32 instanceVersion, const std::vector& extensions, const std::string& required) +{ + // NOTE: this function is only needed in few cases during creation of context, + // dont use it, call Context::isInstanceFunctionalitySupported instead + if (isCoreInstanceExtension(instanceVersion, required)) + return true; + return de::contains(extensions.begin(), extensions.end(), required); +} + bool isLayerSupported (const std::vector& layers, const RequiredLayer& required) { return isLayerSupported(layers.begin(), layers.end(), required); diff --git a/external/vulkancts/framework/vulkan/vkQueryUtil.hpp b/external/vulkancts/framework/vulkan/vkQueryUtil.hpp index 933aca1..27a22d5 100644 --- a/external/vulkancts/framework/vulkan/vkQueryUtil.hpp +++ b/external/vulkancts/framework/vulkan/vkQueryUtil.hpp @@ -112,10 +112,8 @@ bool isCompatible (const VkLayerProperties& layerProperties, cons template bool isExtensionSupported (ExtensionIterator begin, ExtensionIterator end, const RequiredExtension& required); bool isExtensionSupported (const std::vector& extensions, const RequiredExtension& required); -bool isDeviceExtensionSupported (const deUint32 deviceVersion, const std::vector& extensions, const std::string& required); + bool isInstanceExtensionSupported (const deUint32 instanceVersion, const std::vector& extensions, const std::string& required); -bool isDeviceExtensionSupported (const deUint32 deviceVersion, const std::vector& extensions, const RequiredExtension& required); -bool isInstanceExtensionSupported (const deUint32 instanceVersion, const std::vector& extensions, const RequiredExtension& required); template bool isLayerSupported (LayerIterator begin, LayerIterator end, const RequiredLayer& required); diff --git a/external/vulkancts/modules/vulkan/api/vktApiBufferAndImageAllocationUtil.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferAndImageAllocationUtil.cpp index 80ce33a..f6ec0c7 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBufferAndImageAllocationUtil.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferAndImageAllocationUtil.cpp @@ -75,12 +75,8 @@ void BufferDedicatedAllocation::createTestBuffer (VkDeviceSize size, de::MovePtr& memory) const { DE_UNREF(allocator); - const std::vector& extensions = context.getDeviceExtensions(); - const deBool isSupported = isDeviceExtensionSupported(context.getUsedApiVersion(), extensions, "VK_KHR_dedicated_allocation"); - if (!isSupported) - { + if (!context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "Not supported"); - } const InstanceInterface& vkInstance = context.getInstanceInterface(); const VkDevice vkDevice = context.getDevice(); @@ -153,12 +149,8 @@ void ImageDedicatedAllocation::createTestImage (tcu::IVec2 size, VkImageTiling tiling) const { DE_UNREF(allocator); - const std::vector& extensions = context.getDeviceExtensions(); - const deBool isSupported = isDeviceExtensionSupported(context.getUsedApiVersion(), extensions, "VK_KHR_dedicated_allocation"); - if (!isSupported) - { + if (!context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "Not supported"); - } const InstanceInterface& vkInstance = context.getInstanceInterface(); const VkDevice vkDevice = context.getDevice(); diff --git a/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp index 38c13a7..af1a4d6 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp @@ -183,12 +183,8 @@ class DedicatedAllocationBuffersTestCase : public TestCase virtual void checkSupport (Context& ctx) const { - const std::vector& extensions = ctx.getDeviceExtensions(); - const deBool isSupported = isDeviceExtensionSupported(ctx.getUsedApiVersion(), extensions, "VK_KHR_dedicated_allocation"); - if (!isSupported) - { + if (!ctx.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "Not supported"); - } } private: BufferCaseParameters m_testCase; diff --git a/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp index 490ee8f..f25ca0d 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferViewCreateTests.cpp @@ -132,9 +132,7 @@ public: TCU_THROW(NotSupportedError, "Format not supported"); if (m_testCase.bufferAllocationKind == ALLOCATION_KIND_DEDICATED) { - const std::vector& extensions = ctx.getDeviceExtensions(); - const deBool isSupported = isDeviceExtensionSupported(ctx.getUsedApiVersion(), extensions, "VK_KHR_dedicated_allocation"); - if (!isSupported) + if (!ctx.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "Dedicated allocation not supported"); } } diff --git a/external/vulkancts/modules/vulkan/api/vktApiCommandBuffersTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiCommandBuffersTests.cpp index 3596e2a..602a214 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiCommandBuffersTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiCommandBuffersTests.cpp @@ -962,7 +962,7 @@ bool executeSecondaryCmdBuffer (Context& context, tcu::TestStatus trimCommandPoolTest (Context& context, const VkCommandBufferLevel cmdBufferLevel) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance1")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_maintenance1")) TCU_THROW(NotSupportedError, "Extension VK_KHR_maintenance1 not supported"); const VkDevice vkDevice = context.getDevice(); diff --git a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp index 9668657..4a7addb 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp @@ -1162,14 +1162,14 @@ public: { if (m_params.allocationKind == ALLOCATION_KIND_DEDICATED) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_dedicated_allocation")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "VK_KHR_dedicated_allocation is not supported"); } if ((m_params.dst.image.imageType == VK_IMAGE_TYPE_3D && m_params.src.image.imageType == VK_IMAGE_TYPE_2D) || (m_params.dst.image.imageType == VK_IMAGE_TYPE_2D && m_params.src.image.imageType == VK_IMAGE_TYPE_3D)) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance1")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_maintenance1")) TCU_THROW(NotSupportedError, "Extension VK_KHR_maintenance1 not supported"); } diff --git a/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp index 03d7c57..96518db 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp @@ -162,7 +162,7 @@ tcu::TestStatus outOfPoolMemoryTest (Context& context) { const DeviceInterface& vkd = context.getDeviceInterface(); const VkDevice device = context.getDevice(); - const bool expectOutOfPoolMemoryError = isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance1"); + const bool expectOutOfPoolMemoryError = context.isDeviceFunctionalitySupported("VK_KHR_maintenance1"); deUint32 numErrorsReturned = 0; const struct FailureCase diff --git a/external/vulkancts/modules/vulkan/api/vktApiDescriptorSetTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiDescriptorSetTests.cpp index 288fc01..5ce7529 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiDescriptorSetTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiDescriptorSetTests.cpp @@ -225,7 +225,7 @@ tcu::TestStatus emptyDescriptorSetLayoutTest (Context& context, VkDescriptorSetL const VkDevice device = context.getDevice(); if (descriptorSetLayoutCreateFlags == VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR) - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_push_descriptor")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_push_descriptor")) TCU_THROW(NotSupportedError, "VK_KHR_push_descriptor extension not supported"); const VkDescriptorSetLayoutCreateInfo descriptorSetLayoutCreateInfo = diff --git a/external/vulkancts/modules/vulkan/api/vktApiDriverPropertiesTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiDriverPropertiesTests.cpp index bb34906..7fbc029 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiDriverPropertiesTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiDriverPropertiesTests.cpp @@ -99,7 +99,7 @@ DE_INLINE bool operator==(const VkConformanceVersionKHR& a, const VkConformanceV void checkSupport (Context& context, const TestType config) { DE_UNREF(config); - context.requireDeviceExtension("VK_KHR_driver_properties"); + context.requireDeviceFunctionality("VK_KHR_driver_properties"); } void testDriverMatch (const VkPhysicalDeviceDriverPropertiesKHR& deviceDriverProperties) diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp index d0af63a..2b68640 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp @@ -1501,7 +1501,7 @@ tcu::TestStatus deviceMemoryBudgetProperties (Context& context) TestLog& log = context.getTestContext().getLog(); deUint8 buffer[sizeof(VkPhysicalDeviceMemoryBudgetPropertiesEXT) + GUARD_SIZE]; - if (!vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_memory_budget")) + if (!context.isDeviceFunctionalitySupported("VK_EXT_memory_budget")) TCU_THROW(NotSupportedError, "VK_EXT_memory_budget is not supported"); VkPhysicalDeviceMemoryBudgetPropertiesEXT *budgetProps = reinterpret_cast(buffer); @@ -1925,7 +1925,7 @@ void checkYcbcrApiSupport (Context& context) if (!vk::isCoreDeviceExtension(context.getUsedApiVersion(), "VK_KHR_sampler_ycbcr_conversion")) { - if (!vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_sampler_ycbcr_conversion")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_sampler_ycbcr_conversion")) TCU_THROW(NotSupportedError, "VK_KHR_sampler_ycbcr_conversion is not supported"); // Hard dependency for ycbcr @@ -2506,7 +2506,7 @@ tcu::TestStatus imageFormatProperties (Context& context, const VkFormat format, const VkPhysicalDeviceFeatures& deviceFeatures = context.getDeviceFeatures(); const VkPhysicalDeviceLimits& deviceLimits = context.getDeviceProperties().limits; const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(context.getInstanceInterface(), context.getPhysicalDevice(), format); - const bool hasKhrMaintenance1 = isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance1"); + const bool hasKhrMaintenance1 = context.isDeviceFunctionalitySupported("VK_KHR_maintenance1"); const VkFormatFeatureFlags supportedFeatures = tiling == VK_IMAGE_TILING_LINEAR ? formatProperties.linearTilingFeatures : formatProperties.optimalTilingFeatures; const VkImageUsageFlags usageFlagSet = getValidImageUsageFlags(supportedFeatures, hasKhrMaintenance1); @@ -3607,31 +3607,31 @@ tcu::TestStatus testMandatoryExtensions (Context& context) // Instance extensions { - static const char* mandatoryExtensions[] = + static const string mandatoryExtensions[] = { "VK_KHR_get_physical_device_properties2", }; const vector extensions = enumerateInstanceExtensionProperties(context.getPlatformInterface(), DE_NULL); - for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(mandatoryExtensions); ++ndx) + for (const auto ext : mandatoryExtensions) { - if (!isInstanceExtensionSupported(context.getUsedApiVersion(), extensions, RequiredExtension(mandatoryExtensions[ndx]))) - results.fail(string(mandatoryExtensions[ndx]) + " is not supported"); + if (!context.isDeviceFunctionalitySupported(ext)) + results.fail(ext + " is not supported"); } } // Device extensions { - static const char* mandatoryExtensions[] = + static const string mandatoryExtensions[] = { "VK_KHR_maintenance1", }; const vector extensions = enumerateDeviceExtensionProperties(context.getInstanceInterface(), context.getPhysicalDevice(), DE_NULL); - for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(mandatoryExtensions); ++ndx) + for (const auto ext : mandatoryExtensions) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), extensions, RequiredExtension(mandatoryExtensions[ndx]))) - results.fail(string(mandatoryExtensions[ndx]) + " is not supported"); + if (!context.isDeviceFunctionalitySupported(ext)) + results.fail(ext + " is not supported"); } } diff --git a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp index 5521c21..b23b1b3 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp @@ -584,7 +584,7 @@ ImageClearingTestInstance::ImageClearingTestInstance (Context& context, const Te , m_frameBuffer (m_isAttachmentFormat ? createFrameBuffer(*m_imageView, *m_renderPass, params.imageExtent.width, params.imageExtent.height, params.imageViewLayerRange.layerCount) : vk::Move()) { if (m_params.allocationKind == ALLOCATION_KIND_DEDICATED) - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); } ImageClearingTestInstance::ViewType ImageClearingTestInstance::getViewType (deUint32 imageLayerCount) const diff --git a/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp b/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp index 88d5a5c..1fccb37 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiMaintenance3Check.cpp @@ -475,7 +475,7 @@ public: {} virtual void checkSupport (Context& ctx) const { - ctx.requireDeviceExtension("VK_KHR_maintenance3"); + ctx.requireDeviceFunctionality("VK_KHR_maintenance3"); } virtual TestInstance* createInstance (Context& ctx) const { @@ -499,9 +499,8 @@ public: const auto& device = m_context.getDevice(); auto& log = m_context.getTestContext().getLog(); bool iubSupported = false; - bool iubExtSupported = isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_EXT_inline_uniform_block"); - if (iubExtSupported) + if (m_context.isDeviceFunctionalitySupported("VK_EXT_inline_uniform_block")) { DevIubFeat iubFeatures = { @@ -644,7 +643,7 @@ public: {} virtual void checkSupport (Context& ctx) const { - ctx.requireDeviceExtension("VK_KHR_maintenance3"); + ctx.requireDeviceFunctionality("VK_KHR_maintenance3"); } virtual TestInstance* createInstance (Context& ctx) const { diff --git a/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp index 2063159..ecec39a 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiMemoryRequirementInvarianceTests.cpp @@ -260,11 +260,10 @@ tcu::TestStatus InvarianceInstance::iterate (void) size_t refSizes[testCycles]; unsigned int order[testCycles]; bool success = true; - const std::vector& extensions = m_context.getDeviceExtensions(); const deBool isDedicatedAllocationSupported = - isDeviceExtensionSupported(m_context.getUsedApiVersion(), extensions, "VK_KHR_dedicated_allocation"); + m_context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation"); const deBool isYcbcrSupported = - isDeviceExtensionSupported(m_context.getUsedApiVersion(), extensions, "VK_KHR_sampler_ycbcr_conversion"); + m_context.isDeviceFunctionalitySupported("VK_KHR_sampler_ycbcr_conversion"); std::vector optimalFormats; std::vector linearFormats; std::vector memoryTypes; diff --git a/external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp index a4cbb16..253f9d4 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiObjectManagementTests.cpp @@ -324,7 +324,7 @@ T alignToPowerOfTwo (T value, T align) inline bool hasDeviceExtension (Context& context, const string name) { - return isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), name); + return context.isDeviceFunctionalitySupported(name); } VkDeviceSize getPageTableSize (const PlatformMemoryLimits& limits, VkDeviceSize allocationSize) @@ -476,13 +476,14 @@ struct Instance { vector extensionNamePtrs; const vector instanceExts = enumerateInstanceExtensionProperties(env.vkp, DE_NULL); - for (size_t extensionID = 0; extensionID < params.instanceExtensions.size(); extensionID++) + for (const auto& extName : params.instanceExtensions) { - if (!isInstanceExtensionSupported(env.apiVersion, instanceExts, RequiredExtension(params.instanceExtensions[extensionID]))) - TCU_THROW(NotSupportedError, (params.instanceExtensions[extensionID] + " is not supported").c_str()); + bool extNotInCore = !isCoreInstanceExtension(env.apiVersion, extName); + if (extNotInCore && !isExtensionSupported(instanceExts.begin(), instanceExts.end(), RequiredExtension(extName))) + TCU_THROW(NotSupportedError, (extName + " is not supported").c_str()); - if (!isCoreInstanceExtension(env.apiVersion, params.instanceExtensions[extensionID])) - extensionNamePtrs.push_back(params.instanceExtensions[extensionID].c_str()); + if (extNotInCore) + extensionNamePtrs.push_back(extName.c_str()); } const VkApplicationInfo appInfo = diff --git a/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp b/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp index 92b1136..36b4ba8 100644 --- a/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp +++ b/external/vulkancts/modules/vulkan/binding_model/vktBindingBufferDeviceAddressTests.cpp @@ -175,7 +175,7 @@ void BufferAddressTestCase::checkSupport (Context& context) const #if ENABLE_RAYTRACING if (m_data.stage == STAGE_RAYGEN && - !isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_NV_ray_tracing")) + !context.isDeviceFunctionalitySupported("VK_NV_ray_tracing")) { TCU_THROW(NotSupportedError, "Ray tracing not supported"); } @@ -466,7 +466,7 @@ tcu::TestStatus BufferAddressTestInstance::iterate (void) deMemset(&rayTracingProperties, 0, sizeof(rayTracingProperties)); rayTracingProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV; - if (isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_NV_ray_tracing")) + if (m_context.isDeviceFunctionalitySupported("VK_NV_ray_tracing")) { properties.pNext = &rayTracingProperties; } diff --git a/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp b/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp index 00356db..8be1206 100644 --- a/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp +++ b/external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorSetRandomTests.cpp @@ -114,6 +114,38 @@ struct CaseDef VkFlags allPipelineStages; }; +static void getNeededFeatures(const Context& context, + VkPhysicalDeviceFeatures2& features, + VkPhysicalDeviceInlineUniformBlockFeaturesEXT& inlineUniformFeatures, + VkPhysicalDeviceDescriptorIndexingFeaturesEXT& indexingFeatures) +{ + deMemset(&inlineUniformFeatures, 0, sizeof(inlineUniformFeatures)); + inlineUniformFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT; + + deMemset(&indexingFeatures, 0, sizeof(indexingFeatures)); + indexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT; + + deMemset(&features, 0, sizeof(features)); + features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; + + bool descriptorIndexing = context.isDeviceFunctionalitySupported("VK_EXT_descriptor_indexing"); + bool uniformBlock = context.isDeviceFunctionalitySupported("VK_EXT_inline_uniform_block"); + if (descriptorIndexing && uniformBlock) + { + indexingFeatures.pNext = &inlineUniformFeatures; + features.pNext = &indexingFeatures; + } + else if (descriptorIndexing) + { + features.pNext = &indexingFeatures; + } + else if (uniformBlock) + { + features.pNext = &inlineUniformFeatures; + } + + context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &features); +} class RandomLayout { @@ -194,13 +226,13 @@ void DescriptorSetRandomTestCase::checkSupport(Context& context) const properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; void ** pNextTail = &properties.pNext; - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_inline_uniform_block")) + if (context.isDeviceFunctionalitySupported("VK_EXT_inline_uniform_block")) { *pNextTail = &inlineUniformProperties; pNextTail = &inlineUniformProperties.pNext; } - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_NV_ray_tracing")) + if (context.isDeviceFunctionalitySupported("VK_NV_ray_tracing")) { *pNextTail = &rayTracingProperties; pNextTail = &rayTracingProperties.pNext; @@ -209,40 +241,17 @@ void DescriptorSetRandomTestCase::checkSupport(Context& context) const context.getInstanceInterface().getPhysicalDeviceProperties2(context.getPhysicalDevice(), &properties); - VkPhysicalDeviceInlineUniformBlockFeaturesEXT inlineUniformFeatures; - deMemset(&inlineUniformFeatures, 0, sizeof(inlineUniformFeatures)); - inlineUniformFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT; - - VkPhysicalDeviceDescriptorIndexingFeaturesEXT indexingFeatures; - deMemset(&indexingFeatures, 0, sizeof(indexingFeatures)); - indexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT; - VkPhysicalDeviceFeatures2 features; - deMemset(&features, 0, sizeof(features)); - features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; - - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_descriptor_indexing") && - isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_inline_uniform_block")) - { - indexingFeatures.pNext = &inlineUniformFeatures; - features.pNext = &indexingFeatures; - } - else if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_descriptor_indexing")) - { - features.pNext = &indexingFeatures; - } - else if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_inline_uniform_block")) - { - features.pNext = &inlineUniformFeatures; - } + VkPhysicalDeviceDescriptorIndexingFeaturesEXT indexingFeatures; + VkPhysicalDeviceInlineUniformBlockFeaturesEXT inlineUniformFeatures; + getNeededFeatures(context, features, inlineUniformFeatures, indexingFeatures); - context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &features); if (m_data.stage == STAGE_VERTEX && !features.features.vertexPipelineStoresAndAtomics) { return TCU_THROW(NotSupportedError, "Vertex pipeline stores and atomics not supported"); } else if (m_data.stage == STAGE_RAYGEN && - !isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_NV_ray_tracing")) + !context.isDeviceFunctionalitySupported("VK_NV_ray_tracing")) { return TCU_THROW(NotSupportedError, "Ray tracing is not supported"); } @@ -860,39 +869,17 @@ tcu::TestStatus DescriptorSetRandomTestInstance::iterate (void) deMemset(&rayTracingProperties, 0, sizeof(rayTracingProperties)); rayTracingProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV; - if (isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_NV_ray_tracing")) + if (m_context.isDeviceFunctionalitySupported("VK_NV_ray_tracing")) { properties.pNext = &rayTracingProperties; } m_context.getInstanceInterface().getPhysicalDeviceProperties2(m_context.getPhysicalDevice(), &properties); + VkPhysicalDeviceFeatures2 features; VkPhysicalDeviceInlineUniformBlockFeaturesEXT inlineUniformFeatures; - deMemset(&inlineUniformFeatures, 0, sizeof(inlineUniformFeatures)); - inlineUniformFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT; - VkPhysicalDeviceDescriptorIndexingFeaturesEXT indexingFeatures; - deMemset(&indexingFeatures, 0, sizeof(indexingFeatures)); - indexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT; - - VkPhysicalDeviceFeatures2 features; - deMemset(&features, 0, sizeof(features)); - features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; - - if (isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_EXT_descriptor_indexing") && - isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_EXT_inline_uniform_block")) - { - indexingFeatures.pNext = &inlineUniformFeatures; - features.pNext = &indexingFeatures; - } - else if (isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_EXT_descriptor_indexing")) - { - features.pNext = &indexingFeatures; - } - else if (isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_EXT_inline_uniform_block")) - { - features.pNext = &inlineUniformFeatures; - } + getNeededFeatures(m_context, features, inlineUniformFeatures, indexingFeatures); m_context.getInstanceInterface().getPhysicalDeviceFeatures2(m_context.getPhysicalDevice(), &features); diff --git a/external/vulkancts/modules/vulkan/clipping/vktClippingTests.cpp b/external/vulkancts/modules/vulkan/clipping/vktClippingTests.cpp index 073e189..cb9d664 100644 --- a/external/vulkancts/modules/vulkan/clipping/vktClippingTests.cpp +++ b/external/vulkancts/modules/vulkan/clipping/vktClippingTests.cpp @@ -739,7 +739,7 @@ tcu::TestStatus testLargePoints (Context& context) bool pointClippingOutside = true; - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance2")) + if (context.isDeviceFunctionalitySupported("VK_KHR_maintenance2")) { VkPointClippingBehavior clippingBehavior = getClippingBehavior(context.getInstanceInterface(), context.getPhysicalDevice()); diff --git a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp index 721d4a7..0ce3e11 100644 --- a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp +++ b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawAndClearTests.cpp @@ -1352,7 +1352,7 @@ struct AddProgramsUpdateBufferUsingRendering void checkSupport (Context& context) { - context.requireDeviceExtension("VK_EXT_conditional_rendering"); + context.requireDeviceFunctionality("VK_EXT_conditional_rendering"); } } // unnamed namespace diff --git a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalRenderingTestUtil.cpp b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalRenderingTestUtil.cpp index 8f63a66..feb5099 100644 --- a/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalRenderingTestUtil.cpp +++ b/external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalRenderingTestUtil.cpp @@ -33,7 +33,7 @@ namespace conditional void checkConditionalRenderingCapabilities (vkt::Context& context, const ConditionalData& data) { - if (!vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_conditional_rendering")) + if (!context.isDeviceFunctionalitySupported("VK_EXT_conditional_rendering")) TCU_THROW(NotSupportedError, "Missing extension: VK_EXT_conditional_rendering"); if (data.conditionInherited) diff --git a/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTests.cpp b/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTests.cpp index 91e204a..14440cf 100644 --- a/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTests.cpp +++ b/external/vulkancts/modules/vulkan/descriptor_indexing/vktDescriptorSetsIndexingTests.cpp @@ -2999,7 +2999,7 @@ public: virtual void checkSupport (vkt::Context& context) const { - context.requireDeviceExtension("VK_EXT_descriptor_indexing"); + context.requireDeviceFunctionality("VK_EXT_descriptor_indexing"); const vk::VkPhysicalDeviceDescriptorIndexingFeaturesEXT& feats = context.getDescriptorIndexingFeatures(); diff --git a/external/vulkancts/modules/vulkan/device_group/vktDeviceGroupRendering.cpp b/external/vulkancts/modules/vulkan/device_group/vktDeviceGroupRendering.cpp index 9f25b8d..48c0000 100644 --- a/external/vulkancts/modules/vulkan/device_group/vktDeviceGroupRendering.cpp +++ b/external/vulkancts/modules/vulkan/device_group/vktDeviceGroupRendering.cpp @@ -211,7 +211,7 @@ bool DeviceGroupTestInstance::isPeerFetchAllowed (deUint32 memoryTypeIndex, deUi void DeviceGroupTestInstance::init (void) { - if (!isInstanceExtensionSupported(m_context.getUsedApiVersion(), m_context.getInstanceExtensions(), "VK_KHR_device_group_creation")) + if (!m_context.isInstanceFunctionalitySupported("VK_KHR_device_group_creation")) TCU_THROW(NotSupportedError, "Device Group tests are not supported, no device group extension present."); const InstanceInterface& instanceInterface = m_context.getInstanceInterface(); @@ -224,7 +224,7 @@ void DeviceGroupTestInstance::init (void) vector deviceExtensions; vector enabledLayers; - if (!isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_KHR_device_group")) + if (!m_context.isDeviceFunctionalitySupported("VK_KHR_device_group")) TCU_THROW(NotSupportedError, "Missing extension: VK_KHR_device_group"); if (!isCoreDeviceExtension(m_context.getUsedApiVersion(), "VK_KHR_device_group")) @@ -232,7 +232,7 @@ void DeviceGroupTestInstance::init (void) if(m_useDedicated) { - if (!isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_KHR_dedicated_allocation")) + if (!m_context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "Missing extension: VK_KHR_dedicated_allocation"); if (!isCoreDeviceExtension(m_context.getUsedApiVersion(), "VK_KHR_dedicated_allocation")) diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawDiscardRectanglesTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawDiscardRectanglesTests.cpp index 92c7add..375ed88 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawDiscardRectanglesTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawDiscardRectanglesTests.cpp @@ -676,7 +676,7 @@ void DiscardRectanglesTestCase::initPrograms(SourceCollections& programCollectio void DiscardRectanglesTestCase::checkSupport (Context& context) const { - context.requireDeviceExtension("VK_EXT_discard_rectangles"); + context.requireDeviceFunctionality("VK_EXT_discard_rectangles"); } TestInstance* DiscardRectanglesTestCase::createInstance (Context& context) const diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawIndirectTest.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawIndirectTest.cpp index f1877da..d938af2 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawIndirectTest.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawIndirectTest.cpp @@ -919,7 +919,7 @@ tcu::TestStatus IndirectDrawInstanced::iterate (void) void checkIndirectCountExt (Context& context) { - context.requireDeviceExtension("VK_KHR_draw_indirect_count"); + context.requireDeviceFunctionality("VK_KHR_draw_indirect_count"); } } // anonymous diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp index e459779..d4a75cf 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp @@ -290,7 +290,7 @@ public: { if (m_params.testAttribDivisor) { - context.requireDeviceExtension("VK_EXT_vertex_attribute_divisor"); + context.requireDeviceFunctionality("VK_EXT_vertex_attribute_divisor"); const vk::VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT& vertexAttributeDivisorFeatures = context.getVertexAttributeDivisorFeatures(); @@ -302,7 +302,7 @@ public: if (m_params.testMultiview) { - context.requireDeviceExtension("VK_KHR_multiview"); + context.requireDeviceFunctionality("VK_KHR_multiview"); const vk::VkPhysicalDeviceMultiviewFeatures& multiviewFeatures = context.getMultiviewFeatures(); diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp index 2ce792d..678fa1c 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp @@ -394,7 +394,7 @@ public: context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_DEPTH_CLAMP); if (m_params.minDepth > 1.0f || m_params.minDepth < 0.0f || m_params.maxDepth > 1.0f || m_params.maxDepth < 0.0f) - context.requireDeviceExtension("VK_EXT_depth_range_unrestricted"); + context.requireDeviceFunctionality("VK_EXT_depth_range_unrestricted"); } virtual TestInstance* createInstance (Context& context) const diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawNegativeViewportHeightTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawNegativeViewportHeightTests.cpp index 5571350..d7d25fa 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawNegativeViewportHeightTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawNegativeViewportHeightTests.cpp @@ -500,7 +500,7 @@ public: virtual void checkSupport (Context& context) const { - context.requireDeviceExtension("VK_KHR_maintenance1"); + context.requireDeviceFunctionality("VK_KHR_maintenance1"); } virtual TestInstance* createInstance (Context& context) const diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawShaderDrawParametersTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawShaderDrawParametersTests.cpp index 4b120d2..3741046 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawShaderDrawParametersTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawShaderDrawParametersTests.cpp @@ -313,7 +313,7 @@ tcu::TestStatus DrawTest::iterate (void) void checkSupport (Context& context, TestFlags flags) { - context.requireDeviceExtension("VK_KHR_shader_draw_parameters"); + context.requireDeviceFunctionality("VK_KHR_shader_draw_parameters"); // Shader draw parameters is part of Vulkan 1.1 but is optional if (context.contextSupports(vk::ApiVersion(1, 1, 0)) ) diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawShaderLayerTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawShaderLayerTests.cpp index 674fcf3..ee87595 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawShaderLayerTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawShaderLayerTests.cpp @@ -706,7 +706,7 @@ private: void checkRequirements (Context& context, const int) { context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_MULTI_VIEWPORT); - context.requireDeviceExtension("VK_EXT_shader_viewport_index_layer"); + context.requireDeviceFunctionality("VK_EXT_shader_viewport_index_layer"); const VkPhysicalDeviceLimits limits = context.getDeviceProperties().limits; diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawShaderViewportIndexTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawShaderViewportIndexTests.cpp index fbd0501..53275e5 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawShaderViewportIndexTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawShaderViewportIndexTests.cpp @@ -796,7 +796,7 @@ tcu::TestStatus testTessellationShader (Context& context, const int numViewports void checkSupportVertex (Context& context, const int) { context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_MULTI_VIEWPORT); - context.requireDeviceExtension("VK_EXT_shader_viewport_index_layer"); + context.requireDeviceFunctionality("VK_EXT_shader_viewport_index_layer"); if (context.getDeviceProperties().limits.maxViewports < MIN_MAX_VIEWPORTS) TCU_FAIL("multiViewport supported but maxViewports is less than the minimum required"); diff --git a/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp b/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp index 5cc8c00..f7ccb37 100644 --- a/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp +++ b/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp @@ -151,7 +151,7 @@ FSITestCase::~FSITestCase (void) void FSITestCase::checkSupport(Context& context) const { - context.requireDeviceExtension("VK_EXT_fragment_shader_interlock"); + context.requireDeviceFunctionality("VK_EXT_fragment_shader_interlock"); if ((m_data.interlock == INT_SAMPLE_ORDERED || m_data.interlock == INT_SAMPLE_UNORDERED) && !context.getFragmentShaderInterlockFeatures().fragmentShaderSampleInterlock) diff --git a/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp b/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp index 5036867..f6173ba 100644 --- a/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp +++ b/external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp @@ -1743,7 +1743,7 @@ void checkSupport (Context& context, const TestParams params) context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_GEOMETRY_SHADER); if (params.image.viewType == VK_IMAGE_VIEW_TYPE_3D) - context.requireDeviceExtension("VK_KHR_maintenance1"); + context.requireDeviceFunctionality("VK_KHR_maintenance1"); if (params.testType == TEST_TYPE_SECONDARY_CMD_BUFFER) context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_FRAGMENT_STORES_AND_ATOMICS); diff --git a/external/vulkancts/modules/vulkan/image/vktImageCompressionTranscodingSupport.cpp b/external/vulkancts/modules/vulkan/image/vktImageCompressionTranscodingSupport.cpp index 0d7c252..6f5a7b8 100644 --- a/external/vulkancts/modules/vulkan/image/vktImageCompressionTranscodingSupport.cpp +++ b/external/vulkancts/modules/vulkan/image/vktImageCompressionTranscodingSupport.cpp @@ -2849,7 +2849,7 @@ void TexelViewCompatibleCase::checkSupport (Context& context) const const VkPhysicalDevice physicalDevice = context.getPhysicalDevice(); const InstanceInterface& vk = context.getInstanceInterface(); - context.requireDeviceExtension("VK_KHR_maintenance2"); + context.requireDeviceFunctionality("VK_KHR_maintenance2"); { VkImageFormatProperties imageFormatProperties; diff --git a/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp b/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp index bc122db..44eff95 100644 --- a/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp +++ b/external/vulkancts/modules/vulkan/image/vktImageLoadStoreTests.cpp @@ -1753,7 +1753,7 @@ void ImageExtendOperandTest::checkSupport (Context& context) const context.getPhysicalDevice(), m_format)); - if (!context.requireDeviceExtension("VK_KHR_spirv_1_4")) + if (!context.requireDeviceFunctionality("VK_KHR_spirv_1_4")) TCU_THROW(NotSupportedError, "VK_KHR_spirv_1_4 not supported"); if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT)) diff --git a/external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp b/external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp index 1921987..0cac4d8 100644 --- a/external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp +++ b/external/vulkancts/modules/vulkan/image/vktImageMutableTests.cpp @@ -867,7 +867,7 @@ class UploadDownloadExecutor public: UploadDownloadExecutor(Context& context, VkDevice device, VkQueue queue, deUint32 queueFamilyIndex, const CaseDef& caseSpec) : m_caseDef(caseSpec), - m_haveMaintenance2(isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance2")), + m_haveMaintenance2(context.isDeviceFunctionalitySupported("VK_KHR_maintenance2")), m_vk(context.getDeviceInterface()), m_device(device), m_queue(queue), @@ -1651,7 +1651,7 @@ void checkSupport (Context& context, const CaseDef caseDef) // If this is a VK_KHR_image_format_list test, check that the extension is supported if (caseDef.isFormatListTest) - context.requireDeviceExtension("VK_KHR_image_format_list"); + context.requireDeviceFunctionality("VK_KHR_image_format_list"); // Check required features on the format for the required upload/download methods VkFormatProperties imageFormatProps, viewFormatProps; @@ -1706,7 +1706,7 @@ void checkSupport (Context& context, const CaseDef caseDef) if ((viewFormatProps.optimalTilingFeatures & viewFormatFeatureFlags) != viewFormatFeatureFlags) TCU_THROW(NotSupportedError, "View format doesn't support upload/download method"); - const bool haveMaintenance2 = isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance2"); + const bool haveMaintenance2 = context.isDeviceFunctionalitySupported("VK_KHR_maintenance2"); // We don't use the base image for anything other than transfer // operations so there are no features to check. However, The Vulkan diff --git a/external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp b/external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp index 1139bd3..3ca5d03 100644 --- a/external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp +++ b/external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp @@ -846,7 +846,7 @@ bool ImageTranscodingCase::isFormatUsageFlagSupported (Context& context, const V void ImageTranscodingCase::checkSupport (Context& context) const { - context.requireDeviceExtension("VK_KHR_maintenance2"); + context.requireDeviceFunctionality("VK_KHR_maintenance2"); if (!isFormatUsageFlagSupported(context, m_parameters.featuredFormat, m_parameters.testedImageUsageFeature)) TCU_THROW(NotSupportedError, "Test skipped due to feature is not supported by the format"); diff --git a/external/vulkancts/modules/vulkan/imageless_framebuffer/vktImagelessFramebufferTests.cpp b/external/vulkancts/modules/vulkan/imageless_framebuffer/vktImagelessFramebufferTests.cpp index c5549ba..7b44df9 100644 --- a/external/vulkancts/modules/vulkan/imageless_framebuffer/vktImagelessFramebufferTests.cpp +++ b/external/vulkancts/modules/vulkan/imageless_framebuffer/vktImagelessFramebufferTests.cpp @@ -953,7 +953,7 @@ protected: ColorImagelessTestInstance::ColorImagelessTestInstance (Context& context, const TestParameters& parameters) : TestInstance (context) - , m_extensions (context.requireDeviceExtension("VK_KHR_imageless_framebuffer")) + , m_extensions (context.requireDeviceFunctionality("VK_KHR_imageless_framebuffer")) , m_imageExtent2D (makeExtent2D(32u, 32u)) , m_parameters (parameters) , m_colorImageUsage (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT) @@ -1748,7 +1748,7 @@ protected: DepthResolveImagelessTestInstance::DepthResolveImagelessTestInstance (Context& context, const TestParameters& parameters) : DepthImagelessTestInstance (context, parameters) { - context.requireDeviceExtension("VK_KHR_depth_stencil_resolve"); + context.requireDeviceFunctionality("VK_KHR_depth_stencil_resolve"); const InstanceInterface& vki = m_context.getInstanceInterface(); const VkPhysicalDevice physDevice = m_context.getPhysicalDevice(); diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp index 7e5bc54..27815e1 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryBindingTests.cpp @@ -951,7 +951,7 @@ public: virtual void checkSupport (Context& ctx) const { - ctx.requireDeviceExtension("VK_KHR_bind_memory2"); + ctx.requireDeviceFunctionality("VK_KHR_bind_memory2"); if (m_params.usePriority && !ctx.getMemoryPriorityFeatures().memoryPriority) TCU_THROW(NotSupportedError, "VK_EXT_memory_priority Not supported"); diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp index 6040faa..6b5341a 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp @@ -1049,7 +1049,7 @@ struct FormatName void checkSupport (Context& context) { - context.requireDeviceExtension("VK_EXT_external_memory_host"); + context.requireDeviceFunctionality("VK_EXT_external_memory_host"); } } // unnamed namespace diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp index 19c76c8..14c4921 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp @@ -1627,7 +1627,7 @@ void checkSupport (Context& context, TestConfig config) if (config.allocationKind == ALLOCATION_KIND_DEDICATED_IMAGE || config.allocationKind == ALLOCATION_KIND_DEDICATED_BUFFER) { - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); } } diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp index 82d85d6..cea8fda 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp @@ -453,7 +453,7 @@ void checkSupportBufferMemoryRequirementsExtended (Context& context, VkBufferCre { checkSupportBufferMemoryRequirementsOriginal(context, flags); - context.requireDeviceExtension("VK_KHR_get_memory_requirements2"); + context.requireDeviceFunctionality("VK_KHR_get_memory_requirements2"); } void BufferMemoryRequirementsExtended::addFunctionTestCase (tcu::TestCaseGroup* group, @@ -526,7 +526,7 @@ void checkSupportBufferMemoryRequirementsDedicatedAllocation (Context& context, { checkSupportBufferMemoryRequirementsExtended(context, flags); - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); } void BufferMemoryRequirementsDedicatedAllocation::addFunctionTestCase (tcu::TestCaseGroup* group, @@ -656,10 +656,9 @@ protected: const VkPhysicalDeviceMemoryProperties& deviceMemoryProperties); private: - virtual bool isImageSupported (const deUint32 apiVersion, + virtual bool isImageSupported (const Context& context, const InstanceInterface& vki, const VkPhysicalDevice physDevice, - const std::vector& deviceExtensions, const VkImageCreateInfo& info); virtual bool isFormatMatchingAspect (const VkFormat format, @@ -816,7 +815,7 @@ bool isUsageMatchesFeatures (const VkImageUsageFlags usage, const VkFormatFeatur } //! This catches both invalid as well as legal but unsupported combinations of image parameters -bool ImageMemoryRequirementsOriginal::isImageSupported (const deUint32 apiVersion, const InstanceInterface& vki, const VkPhysicalDevice physDevice, const std::vector& deviceExtensions, const VkImageCreateInfo& info) +bool ImageMemoryRequirementsOriginal::isImageSupported (const Context& context, const InstanceInterface& vki, const VkPhysicalDevice physDevice, const VkImageCreateInfo& info) { DE_ASSERT(info.extent.width >= 1u && info.extent.height >= 1u && info.extent.depth >= 1u); @@ -825,7 +824,7 @@ bool ImageMemoryRequirementsOriginal::isImageSupported (const deUint32 apiVersio || info.mipLevels != 1 || info.arrayLayers != 1 || info.samples != VK_SAMPLE_COUNT_1_BIT)) - || !isDeviceExtensionSupported(apiVersion, deviceExtensions, "VK_KHR_sampler_ycbcr_conversion")) + || !context.isDeviceFunctionalitySupported("VK_KHR_sampler_ycbcr_conversion")) { return false; } @@ -1315,7 +1314,7 @@ tcu::TestStatus ImageMemoryRequirementsOriginal::execTest (Context& context, con m_currentTestImageInfo = imageInfo; - if (!isImageSupported(context.getUsedApiVersion(), vki, physDevice, context.getDeviceExtensions(), m_currentTestImageInfo)) + if (!isImageSupported(context, vki, physDevice, m_currentTestImageInfo)) continue; log << tcu::TestLog::Message << "- " << getImageInfoString(m_currentTestImageInfo) << tcu::TestLog::EndMessage; @@ -1375,7 +1374,7 @@ void checkSupportImageMemoryRequirementsExtended (Context& context, ImageTestPar { checkSupportImageMemoryRequirementsOriginal(context, params); - context.requireDeviceExtension("VK_KHR_get_memory_requirements2"); + context.requireDeviceFunctionality("VK_KHR_get_memory_requirements2"); } void ImageMemoryRequirementsExtended::addFunctionTestCase (tcu::TestCaseGroup* group, @@ -1428,7 +1427,7 @@ void checkSupportImageMemoryRequirementsDedicatedAllocation (Context& context, I { checkSupportImageMemoryRequirementsExtended(context, params); - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); } void ImageMemoryRequirementsDedicatedAllocation::addFunctionTestCase (tcu::TestCaseGroup* group, @@ -1684,8 +1683,8 @@ void checkSupportMultiplane (Context& context, ImageTestParams params) { checkSupportImageMemoryRequirementsOriginal(context, params); - context.requireDeviceExtension("VK_KHR_get_memory_requirements2"); - context.requireDeviceExtension("VK_KHR_sampler_ycbcr_conversion"); + context.requireDeviceFunctionality("VK_KHR_get_memory_requirements2"); + context.requireDeviceFunctionality("VK_KHR_sampler_ycbcr_conversion"); } void populateMultiplaneTestGroup (tcu::TestCaseGroup* group) diff --git a/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp b/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp index 6611e5a..2225726 100644 --- a/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp +++ b/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp @@ -318,7 +318,7 @@ protected: MultiViewRenderTestInstance::MultiViewRenderTestInstance (Context& context, const TestParameters& parameters) : TestInstance (context) - , m_extensionSupported ((parameters.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((parameters.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_parameters (fillMissingParameters(parameters)) , m_seed (context.getTestContext().getCommandLine().getBaseSeed()) , m_squareCount (4u) @@ -3364,7 +3364,7 @@ private: virtual void checkSupport (Context& context) const { - context.requireDeviceExtension("VK_KHR_multiview"); + context.requireDeviceFunctionality("VK_KHR_multiview"); } void initPrograms (SourceCollections& programCollection) const diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp index 95b3952..8447b10 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineCreationFeedbackTests.cpp @@ -528,7 +528,7 @@ CacheTestInstance::CacheTestInstance (Context& context, const CacheTestParam* param) : TestInstance (context) , m_param (param) - , m_extensions (m_context.requireDeviceExtension("VK_EXT_pipeline_creation_feedback")) + , m_extensions (m_context.requireDeviceFunctionality("VK_EXT_pipeline_creation_feedback")) { const DeviceInterface& vk = m_context.getDeviceInterface(); const VkDevice vkDevice = m_context.getDevice(); diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineDepthRangeUnrestrictedTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineDepthRangeUnrestrictedTests.cpp index eea59f5..fc22f93 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineDepthRangeUnrestrictedTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineDepthRangeUnrestrictedTests.cpp @@ -794,7 +794,7 @@ DepthRangeUnrestrictedTestInstance::DepthRangeUnrestrictedTestInstance (Context& const DepthRangeUnrestrictedParam param) : TestInstance (context) , m_param (param) - , m_extensions (m_context.requireDeviceExtension("VK_EXT_depth_range_unrestricted")) + , m_extensions (m_context.requireDeviceFunctionality("VK_EXT_depth_range_unrestricted")) , m_renderSize (tcu::UVec2(32,32)) , m_colorFormat (VK_FORMAT_R8G8B8A8_UNORM) , m_shaderStageCount (0) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineExecutablePropertiesTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineExecutablePropertiesTests.cpp index 9543ea5..54e9456 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineExecutablePropertiesTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineExecutablePropertiesTests.cpp @@ -575,7 +575,7 @@ ExecutablePropertiesTestInstance::ExecutablePropertiesTestInstance (Context& const ExecutablePropertiesTestParam* param) : TestInstance (context) , m_param (param) - , m_extensions (m_context.requireDeviceExtension("VK_KHR_pipeline_executable_properties")) + , m_extensions (m_context.requireDeviceFunctionality("VK_KHR_pipeline_executable_properties")) { const DeviceInterface& vk = m_context.getDeviceInterface(); const VkDevice vkDevice = m_context.getDevice(); diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp index 44d7873..58d9eb1 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp @@ -205,8 +205,8 @@ void checkSupportImageSamplingInstance (Context& context, ImageSamplingInstanceP if (params.separateStencilUsage) { - context.requireDeviceExtension("VK_EXT_separate_stencil_usage"); - context.requireInstanceExtension("VK_KHR_get_physical_device_properties2"); + context.requireDeviceFunctionality("VK_EXT_separate_stencil_usage"); + context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2"); const VkImageStencilUsageCreateInfoEXT stencilUsage = { @@ -259,7 +259,7 @@ void checkSupportImageSamplingInstance (Context& context, ImageSamplingInstanceP if (nextType == VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT) { - context.requireDeviceExtension("VK_EXT_sampler_filter_minmax"); + context.requireDeviceFunctionality("VK_EXT_sampler_filter_minmax"); if (!isMinMaxFilteringSupported(context.getInstanceInterface(), context.getPhysicalDevice(), params.imageFormat, VK_IMAGE_TILING_OPTIMAL)) throw tcu::NotSupportedError(std::string("Unsupported format for min/max filtering: ") + getFormatName(params.imageFormat)); @@ -270,7 +270,7 @@ void checkSupportImageSamplingInstance (Context& context, ImageSamplingInstanceP params.samplerParams.addressModeV == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE || params.samplerParams.addressModeW == VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE) { - context.requireDeviceExtension("VK_KHR_sampler_mirror_clamp_to_edge"); + context.requireDeviceFunctionality("VK_KHR_sampler_mirror_clamp_to_edge"); } if ((isCompressedFormat(params.imageFormat) || isDepthStencilFormat(params.imageFormat)) && params.imageViewType == VK_IMAGE_VIEW_TYPE_3D) @@ -301,7 +301,7 @@ void checkSupportImageSamplingInstance (Context& context, ImageSamplingInstanceP context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_IMAGE_CUBE_ARRAY); if (params.allocationKind == ALLOCATION_KIND_DEDICATED) - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); } ImageSamplingInstance::ImageSamplingInstance (Context& context, diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineInputAssemblyTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineInputAssemblyTests.cpp index 9e72805..9af8969 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineInputAssemblyTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineInputAssemblyTests.cpp @@ -226,7 +226,7 @@ InputAssemblyTest::InputAssemblyTest (tcu::TestContext& testContext, void InputAssemblyTest::checkSupport (Context& context) const { if (m_indexType == VK_INDEX_TYPE_UINT8_EXT) - context.requireDeviceExtension("VK_EXT_index_type_uint8"); + context.requireDeviceFunctionality("VK_EXT_index_type_uint8"); switch (m_primitiveTopology) { diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleSampleLocationsExtTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleSampleLocationsExtTests.cpp index 0be7e46..6067bd2 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleSampleLocationsExtTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleSampleLocationsExtTests.cpp @@ -140,7 +140,7 @@ void addInstanceTestCaseWithPrograms (tcu::TestCaseGroup* group, void checkSupportSampleLocations (Context& context) { - context.requireDeviceExtension("VK_EXT_sample_locations"); + context.requireDeviceFunctionality("VK_EXT_sample_locations"); } std::string getString (const VkSampleCountFlagBits sampleCount) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp index fdeee4d..e184950 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp @@ -1491,7 +1491,7 @@ void SampleMaskWithDepthTestTest::checkSupport (Context& context) const if (!context.getDeviceProperties().limits.standardSampleLocations) TCU_THROW(NotSupportedError, "standardSampleLocations required"); - context.requireDeviceExtension("VK_EXT_post_depth_coverage"); + context.requireDeviceFunctionality("VK_EXT_post_depth_coverage"); } void SampleMaskWithDepthTestTest::initPrograms (SourceCollections& programCollection) const diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineRenderToImageTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineRenderToImageTests.cpp index 2a73bbe..859319d 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineRenderToImageTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineRenderToImageTests.cpp @@ -1213,7 +1213,7 @@ tcu::TestStatus testWithSizeReduction (Context& context, const CaseDef& caseDef) void checkImageViewTypeRequirements (Context& context, const VkImageViewType viewType) { if (viewType == VK_IMAGE_VIEW_TYPE_3D) - context.requireDeviceExtension("VK_KHR_maintenance1"); + context.requireDeviceFunctionality("VK_KHR_maintenance1"); if (viewType == VK_IMAGE_VIEW_TYPE_CUBE_ARRAY) context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_IMAGE_CUBE_ARRAY); @@ -1224,7 +1224,7 @@ void checkSupportAttachmentSize (Context& context, const CaseDef caseDef) checkImageViewTypeRequirements(context, caseDef.viewType); if (caseDef.allocationKind == ALLOCATION_KIND_DEDICATED) - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); if (caseDef.depthStencilFormat != VK_FORMAT_UNDEFINED && !isDepthStencilFormatSupported(context.getInstanceInterface(), context.getPhysicalDevice(), caseDef.depthStencilFormat)) TCU_THROW(NotSupportedError, "Unsupported depth/stencil format"); @@ -1367,7 +1367,7 @@ void checkSupportRenderToMipMaps (Context& context, const CaseDef caseDef) checkImageViewTypeRequirements(context, caseDef.viewType); if (caseDef.allocationKind == ALLOCATION_KIND_DEDICATED) - context.requireDeviceExtension("VK_KHR_dedicated_allocation"); + context.requireDeviceFunctionality("VK_KHR_dedicated_allocation"); if (caseDef.depthStencilFormat != VK_FORMAT_UNDEFINED && !isDepthStencilFormatSupported(context.getInstanceInterface(), context.getPhysicalDevice(), caseDef.depthStencilFormat)) TCU_THROW(NotSupportedError, "Unsupported depth/stencil format"); diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilExportTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilExportTests.cpp index e2ed6dd..a9e6cce 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilExportTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineStencilExportTests.cpp @@ -544,7 +544,7 @@ tcu::TestStatus testStencilExportReplace (Context& context) void checkSupport (Context& context) { - context.requireDeviceExtension("VK_EXT_shader_stencil_export"); + context.requireDeviceFunctionality("VK_EXT_shader_stencil_export"); const VkFormat stencilFormat = VK_FORMAT_S8_UINT; if (!isSupportedDepthStencilFormat(context.getInstanceInterface(), context.getPhysicalDevice(), stencilFormat)) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp index 1cdda8f..5555672 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineTimestampTests.cpp @@ -703,7 +703,7 @@ void TimestampTest::checkSupport (Context& context) const if (m_hostQueryReset) { // Check VK_EXT_host_query_reset is supported - context.requireDeviceExtension("VK_EXT_host_query_reset"); + context.requireDeviceFunctionality("VK_EXT_host_query_reset"); if(context.getHostQueryResetFeatures().hostQueryReset == VK_FALSE) throw tcu::NotSupportedError("Implementation doesn't support resetting queries from the host"); @@ -1069,7 +1069,7 @@ vkt::TestInstance* CalibratedTimestampTest::createInstance (Context& context) template void CalibratedTimestampTest::checkSupport (Context& context) const { - context.requireDeviceExtension("VK_EXT_calibrated_timestamps"); + context.requireDeviceFunctionality("VK_EXT_calibrated_timestamps"); } CalibratedTimestampTestInstance::CalibratedTimestampTestInstance (Context& context) diff --git a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.cpp b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.cpp index b13b007..f5728e0 100644 --- a/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.cpp +++ b/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.cpp @@ -56,12 +56,18 @@ CustomInstance makeProtectedMemInstance (vkt::Context& context, const std::vecto const Extensions supportedExtensions(vk::enumerateInstanceExtensionProperties(vkp, DE_NULL)); std::vector requiredExtensions = extraExtensions; - if (!isCoreInstanceExtension(context.getUsedApiVersion(), "VK_KHR_get_physical_device_properties2")) + deUint32 apiVersion = context.getUsedApiVersion(); + if (!isCoreInstanceExtension(apiVersion, "VK_KHR_get_physical_device_properties2")) requiredExtensions.push_back("VK_KHR_get_physical_device_properties2"); + // extract extension names + std::vector extensions; + for (const auto& e : supportedExtensions) + extensions.push_back(e.extensionName); + for (const auto& extName : requiredExtensions) { - if (!isInstanceExtensionSupported(context.getUsedApiVersion(), supportedExtensions, vk::RequiredExtension(extName))) + if (!isInstanceExtensionSupported(apiVersion, extensions, extName)) TCU_THROW(NotSupportedError, (extName + " is not supported").c_str()); } @@ -148,10 +154,11 @@ vk::Move makeProtectedMemDevice (const vk::PlatformInterface& vkp // Check if the physical device supports the protected memory extension name for (deUint32 ndx = 0; ndx < extensions.size(); ++ndx) { - if (!isDeviceExtensionSupported(apiVersion, supportedExtensions, vk::RequiredExtension(extensions[ndx]))) + bool notInCore = !isCoreDeviceExtension(apiVersion, extensions[ndx]); + if (notInCore && !isExtensionSupported(supportedExtensions.begin(), supportedExtensions.end(), RequiredExtension(extensions[ndx]))) TCU_THROW(NotSupportedError, (extensions[ndx] + " is not supported").c_str()); - if (!isCoreDeviceExtension(apiVersion, extensions[ndx])) + if (notInCore) requiredExtensions.push_back(extensions[ndx]); } diff --git a/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp b/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp index 7be6768..5c1a2b5 100644 --- a/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp +++ b/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolOcclusionTests.cpp @@ -353,7 +353,7 @@ tcu::TestStatus BasicOcclusionQueryTestInstance::iterate (void) if (m_testVector.queryResultsMode == RESULTS_MODE_GET_RESET) { // Check VK_EXT_host_query_reset is supported - m_context.requireDeviceExtension("VK_EXT_host_query_reset"); + m_context.requireDeviceFunctionality("VK_EXT_host_query_reset"); if(m_context.getHostQueryResetFeatures().hostQueryReset == VK_FALSE) throw tcu::NotSupportedError(std::string("Implementation doesn't support resetting queries from the host").c_str()); } @@ -601,7 +601,7 @@ tcu::TestStatus OcclusionQueryTestInstance::iterate (void) if (m_testVector.queryResultsMode == RESULTS_MODE_GET_RESET) { // Check VK_EXT_host_query_reset is supported - m_context.requireDeviceExtension("VK_EXT_host_query_reset"); + m_context.requireDeviceFunctionality("VK_EXT_host_query_reset"); if(m_context.getHostQueryResetFeatures().hostQueryReset == VK_FALSE) throw tcu::NotSupportedError(std::string("Implementation doesn't support resetting queries from the host").c_str()); } diff --git a/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp b/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp index 55277b7..56385f1 100644 --- a/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp +++ b/external/vulkancts/modules/vulkan/query_pool/vktQueryPoolStatisticsTests.cpp @@ -331,7 +331,7 @@ void StatisticQueryTestInstance::checkExtensions (deBool hostResetQueryEnabled) if (hostResetQueryEnabled == DE_TRUE) { // Check VK_EXT_host_query_reset is supported - m_context.requireDeviceExtension("VK_EXT_host_query_reset"); + m_context.requireDeviceFunctionality("VK_EXT_host_query_reset"); if(m_context.getHostQueryResetFeatures().hostQueryReset == VK_FALSE) throw tcu::NotSupportedError(std::string("Implementation doesn't support resetting queries from the host").c_str()); } diff --git a/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp b/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp index cc44dbe..db46bfa 100644 --- a/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp +++ b/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp @@ -1027,7 +1027,7 @@ BaseLineTestInstance::BaseLineTestInstance (Context& context, { DE_ASSERT(m_primitiveWideness < PRIMITIVEWIDENESS_LAST); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_line_rasterization")) + if (context.isDeviceFunctionalitySupported("VK_EXT_line_rasterization")) { VkPhysicalDeviceLineRasterizationPropertiesEXT lineRasterizationProperties = { diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDepthStencilResolveTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDepthStencilResolveTests.cpp index b807f94..c40801c 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDepthStencilResolveTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassDepthStencilResolveTests.cpp @@ -217,7 +217,7 @@ DepthStencilResolveTest::~DepthStencilResolveTest (void) bool DepthStencilResolveTest::isFeaturesSupported() { - m_context.requireDeviceExtension("VK_KHR_depth_stencil_resolve"); + m_context.requireDeviceFunctionality("VK_KHR_depth_stencil_resolve"); if (m_config.imageLayers > 1) m_context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_GEOMETRY_SHADER); diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleResolveTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleResolveTests.cpp index 504c3be..0d6188a 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleResolveTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleResolveTests.cpp @@ -185,7 +185,7 @@ protected: MultisampleRenderPassTestBase::MultisampleRenderPassTestBase (Context& context, TestConfig config, deUint32 attachmentsCount) : TestInstance (context) , m_featuresSupported (featuresSupported(context, config)) - , m_extensionSupported ((config.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((config.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_renderPassType (config.renderPassType) , m_format (config.format) , m_sampleCount (sampleCountBitFromSampleCount(config.sampleCount)) diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleTests.cpp index 3a9ec60..65a9f6a 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassMultisampleTests.cpp @@ -1252,12 +1252,12 @@ bool isExtensionSupported(Context& context, RenderPassType renderPassType, TestS { if (renderPassType == RENDERPASS_TYPE_RENDERPASS2) - context.requireDeviceExtension("VK_KHR_create_renderpass2"); + context.requireDeviceFunctionality("VK_KHR_create_renderpass2"); if (separateStencilUsage) { - context.requireDeviceExtension ("VK_EXT_separate_stencil_usage"); - context.requireInstanceExtension("VK_KHR_get_physical_device_properties2"); + context.requireDeviceFunctionality ("VK_EXT_separate_stencil_usage"); + context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2"); } return true; diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSampleReadTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSampleReadTests.cpp index 0fb447b..a45675e 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSampleReadTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSampleReadTests.cpp @@ -797,7 +797,7 @@ private: SampleReadTestInstance::SampleReadTestInstance (Context& context, TestConfig config) : TestInstance (context) , m_extensionSupported (context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_SAMPLE_RATE_SHADING) && - ((config.renderPassType != RENDERPASS_TYPE_RENDERPASS2) || context.requireDeviceExtension("VK_KHR_create_renderpass2"))) + ((config.renderPassType != RENDERPASS_TYPE_RENDERPASS2) || context.requireDeviceFunctionality("VK_KHR_create_renderpass2"))) , m_renderPassType (config.renderPassType) , m_sampleCount (config.sampleCount) , m_width (32u) diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp index 62f9d6a..85e40e2 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp @@ -410,7 +410,7 @@ private: SparseRenderTargetTestInstance::SparseRenderTargetTestInstance (Context& context, TestConfig testConfig) : TestInstance (context) - , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_renderPassType (testConfig.renderPassType) , m_width (32u) , m_height (32u) diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp index 365ded4..b4c91d2 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSubpassDependencyTests.cpp @@ -491,7 +491,7 @@ private: ExternalDependencyTestInstance::ExternalDependencyTestInstance (Context& context, ExternalTestConfig testConfig) : TestInstance (context) - , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_renderPassType (testConfig.renderPassType) , m_width (testConfig.imageSize.x()) , m_height (testConfig.imageSize.y()) @@ -1086,7 +1086,7 @@ private: SubpassDependencyTestInstance::SubpassDependencyTestInstance (Context& context, SubpassTestConfig testConfig) : TestInstance (context) - , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_renderPassInfo (testConfig.renderPass) , m_renderPassType (testConfig.renderPassType) , m_width (testConfig.imageSize.x()) @@ -1805,7 +1805,7 @@ private: SubpassSelfDependencyBackwardsTestInstance::SubpassSelfDependencyBackwardsTestInstance (Context& context, SubpassSelfDependencyBackwardsTestConfig testConfig) : TestInstance (context) - , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_featuresSupported (context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_GEOMETRY_SHADER)) , m_renderPassType (testConfig.renderPassType) , m_width (testConfig.imageSize.x()) @@ -2264,7 +2264,7 @@ private: SeparateChannelsTestInstance::SeparateChannelsTestInstance (Context& context, SeparateChannelsTestConfig testConfig) : TestInstance (context) - , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceExtension("VK_KHR_create_renderpass2")) + , m_extensionSupported ((testConfig.renderPassType == RENDERPASS_TYPE_RENDERPASS2) && context.requireDeviceFunctionality("VK_KHR_create_renderpass2")) , m_renderPassType (testConfig.renderPassType) , m_width (256u) , m_height (256u) diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp index ba3b223..abbe78c 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassTests.cpp @@ -4519,17 +4519,17 @@ tcu::TestStatus renderPassTest (Context& context, TestConfig config) vector subpassRenderInfo; if (config.renderPassType == RENDERPASS_TYPE_RENDERPASS2) - context.requireDeviceExtension("VK_KHR_create_renderpass2"); + context.requireDeviceFunctionality("VK_KHR_create_renderpass2"); if (config.allocationKind == ALLOCATION_KIND_DEDICATED) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_dedicated_allocation")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) TCU_THROW(NotSupportedError, "VK_KHR_dedicated_allocation is not supported"); } if (!renderPassInfo.getInputAspects().empty()) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance2")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_maintenance2")) TCU_THROW(NotSupportedError, "Extension VK_KHR_maintenance2 not supported."); } @@ -4590,7 +4590,7 @@ tcu::TestStatus renderPassTest (Context& context, TestConfig config) } } - if (requireDepthStencilLayout && !isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance2")) + if (requireDepthStencilLayout && !context.isDeviceFunctionalitySupported("VK_KHR_maintenance2")) TCU_THROW(NotSupportedError, "VK_KHR_maintenance2 is not supported"); } diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentTests.cpp index 11ea07d..e8afdf7 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedAttachmentTests.cpp @@ -361,7 +361,7 @@ UnusedAttachmentTestInstance::UnusedAttachmentTestInstance (Context& context, // Check for renderpass2 extension if used if (testParams.renderPassType == RENDERPASS_TYPE_RENDERPASS2) - context.requireDeviceExtension("VK_KHR_create_renderpass2"); + context.requireDeviceFunctionality("VK_KHR_create_renderpass2"); // Create color image { diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedClearAttachmentTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedClearAttachmentTests.cpp index 01fec52..8d68f43 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedClearAttachmentTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassUnusedClearAttachmentTests.cpp @@ -205,7 +205,7 @@ void UnusedClearAttachmentTest::checkSupport (Context& context) const { // Check for renderpass2 extension if used if (m_testParams.renderPassType == RENDERPASS_TYPE_RENDERPASS2) - context.requireDeviceExtension("VK_KHR_create_renderpass2"); + context.requireDeviceFunctionality("VK_KHR_create_renderpass2"); // Check support for the needed color, depth and stencil formats. if (!m_testParams.colorUsed.empty()) diff --git a/external/vulkancts/modules/vulkan/robustness/vktRobustBufferAccessWithVariablePointersTests.cpp b/external/vulkancts/modules/vulkan/robustness/vktRobustBufferAccessWithVariablePointersTests.cpp index 7ab9d7d..5728ffb 100644 --- a/external/vulkancts/modules/vulkan/robustness/vktRobustBufferAccessWithVariablePointersTests.cpp +++ b/external/vulkancts/modules/vulkan/robustness/vktRobustBufferAccessWithVariablePointersTests.cpp @@ -64,10 +64,7 @@ namespace { // A function for getting information on variable pointer features supported through physical device -vk::VkPhysicalDeviceVariablePointersFeatures querySupportedVariablePointersFeatures (const deUint32 apiVersion, - const InstanceInterface& vki, - VkPhysicalDevice device, - const std::vector& instanceExtensions) +vk::VkPhysicalDeviceVariablePointersFeatures querySupportedVariablePointersFeatures (const Context& context) { VkPhysicalDeviceVariablePointersFeatures extensionFeatures = { @@ -83,9 +80,9 @@ vk::VkPhysicalDeviceVariablePointersFeatures querySupportedVariablePointersFeatu features.pNext = &extensionFeatures; // Call the getter only if supported. Otherwise above "zero" defaults are used - if (isInstanceExtensionSupported(apiVersion, instanceExtensions, "VK_KHR_get_physical_device_properties2")) + if (context.isInstanceFunctionalitySupported("VK_KHR_get_physical_device_properties2")) { - vki.getPhysicalDeviceFeatures2(device, &features); + context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &features); } return extensionFeatures; @@ -1231,7 +1228,7 @@ RobustReadTest::RobustReadTest (tcu::TestContext& testContext, TestInstance* RobustReadTest::createInstance (Context& context) const { - VkPhysicalDeviceVariablePointersFeatures pointerFeatures = querySupportedVariablePointersFeatures(context.getUsedApiVersion(), context.getInstanceInterface(), context.getPhysicalDevice(), context.getInstanceExtensions()); + VkPhysicalDeviceVariablePointersFeatures pointerFeatures = querySupportedVariablePointersFeatures(context); if (pointerFeatures.variablePointersStorageBuffer != DE_TRUE) return new NotSupportedInstance(context, std::string("VariablePointersStorageBuffer support is required for this test.")); @@ -1271,7 +1268,7 @@ RobustWriteTest::RobustWriteTest (tcu::TestContext& testContext, TestInstance* RobustWriteTest::createInstance (Context& context) const { - VkPhysicalDeviceVariablePointersFeatures pointerFeatures = querySupportedVariablePointersFeatures(context.getUsedApiVersion(), context.getInstanceInterface(), context.getPhysicalDevice(), context.getInstanceExtensions()); + VkPhysicalDeviceVariablePointersFeatures pointerFeatures = querySupportedVariablePointersFeatures(context); if (pointerFeatures.variablePointersStorageBuffer != DE_TRUE) return new NotSupportedInstance(context, std::string("VariablePointersStorageBuffer support is required for this test.")); diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktAtomicOperationTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktAtomicOperationTests.cpp index 8e46111..ed3244a 100644 --- a/external/vulkancts/modules/vulkan/shaderexecutor/vktAtomicOperationTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktAtomicOperationTests.cpp @@ -468,7 +468,7 @@ AtomicOperationCaseInstance::AtomicOperationCaseInstance (Context& context, { if ((m_dataType == DATA_TYPE_INT64) || (m_dataType == DATA_TYPE_UINT64)) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_shader_atomic_int64")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_shader_atomic_int64")) TCU_THROW(NotSupportedError, "Missing extension: VK_KHR_shader_atomic_int64"); VkPhysicalDeviceShaderAtomicInt64FeaturesKHR shaderAtomicInt64Features; diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp index f43a8ad..ab7d304 100644 --- a/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp @@ -1209,7 +1209,7 @@ tcu::TestStatus BlockArrayIndexingCaseInstance::iterate (void) if ((m_flags & FLAG_USE_STORAGE_BUFFER) != 0) { - if (!isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_KHR_storage_buffer_storage_class")) + if (!m_context.isDeviceFunctionalitySupported("VK_KHR_storage_buffer_storage_class")) TCU_THROW(NotSupportedError, "VK_KHR_storage_buffer_storage_class is not supported"); } diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp index 412b6c4..e89f07a 100644 --- a/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktShaderClockTests.cpp @@ -122,7 +122,7 @@ public: private: void checkSupported(void) { - m_context.requireDeviceExtension("VK_KHR_shader_clock"); + m_context.requireDeviceFunctionality("VK_KHR_shader_clock"); VkPhysicalDeviceShaderClockFeaturesKHR shaderClockFeatures; shaderClockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR; diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp index f440f1f..2c0a3e8 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp @@ -2751,8 +2751,7 @@ void TestGroupBuilderBase::setupVulkanFeatures(FloatType inFloatType, // features are set to the same value when specific independence settings are used. tcu::TestStatus verifyIndependenceSettings(Context& context) { - const std::vector& deviceExtensions = context.getDeviceExtensions(); - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), deviceExtensions, "VK_KHR_shader_float_controls")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_shader_float_controls")) TCU_THROW(NotSupportedError, "VK_KHR_shader_float_controls not supported"); vk::VkPhysicalDeviceFloatControlsPropertiesKHR fcProperties; diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmUtils.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmUtils.cpp index c516331..3182a79 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmUtils.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmUtils.cpp @@ -198,8 +198,7 @@ bool isFloatControlsFeaturesSupported (const Context& context, const ExtensionFl return true; // return false when float control features are requested and proper extension is not supported - const std::vector& deviceExtensions = context.getDeviceExtensions(); - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), deviceExtensions, "VK_KHR_shader_float_controls")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_shader_float_controls")) return false; // perform query to get supported float control properties diff --git a/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp b/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp index b0f9ecc..e0ef17c 100644 --- a/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp +++ b/external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp @@ -2537,7 +2537,7 @@ void SSBOLayoutCase::initPrograms (vk::SourceCollections& programCollection) con TestInstance* SSBOLayoutCase::createInstance (Context& context) const { - if (!vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_relaxed_block_layout") && usesRelaxedLayout(m_interface)) + if (!context.isDeviceFunctionalitySupported("VK_KHR_relaxed_block_layout") && usesRelaxedLayout(m_interface)) TCU_THROW(NotSupportedError, "VK_KHR_relaxed_block_layout not supported"); if (!context.get16BitStorageFeatures().storageBuffer16BitAccess && uses16BitStorage(m_interface)) TCU_THROW(NotSupportedError, "storageBuffer16BitAccess not supported"); diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp index 3e5e253..7e66faa 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp @@ -495,7 +495,7 @@ void supportedCheck (Context& context, CaseDefinition caseDef) if (!subgroups::isFormatSupportedForDevice(context, caseDef.format)) TCU_THROW(NotSupportedError, "Device does not support the specified format in subgroup operations"); - if (caseDef.extShaderSubGroupBallotTests && !context.requireDeviceExtension("VK_EXT_shader_subgroup_ballot")) + if (caseDef.extShaderSubGroupBallotTests && !context.requireDeviceFunctionality("VK_EXT_shader_subgroup_ballot")) { TCU_THROW(NotSupportedError, "Device does not support VK_EXT_shader_subgroup_ballot extension"); } diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp index 9c719e9..9894e76 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp @@ -390,7 +390,7 @@ void supportedCheck (Context& context, CaseDefinition caseDef) if (!subgroups::isSubgroupSupported(context)) TCU_THROW(NotSupportedError, "Subgroup operations are not supported"); - if (!context.requireDeviceExtension("VK_EXT_shader_subgroup_ballot")) + if (!context.requireDeviceFunctionality("VK_EXT_shader_subgroup_ballot")) { TCU_THROW(NotSupportedError, "Device does not support VK_EXT_shader_subgroup_ballot extension"); } diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp index 822428d..32648ab 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp @@ -904,7 +904,7 @@ void supportedCheck (Context& context, CaseDefinition caseDef) TCU_THROW(NotSupportedError, "Device does not support subgroup ballot operations"); } - if (caseDef.extShaderSubGroupBallotTests && !context.requireDeviceExtension("VK_EXT_shader_subgroup_ballot")) + if (caseDef.extShaderSubGroupBallotTests && !context.requireDeviceFunctionality("VK_EXT_shader_subgroup_ballot")) { TCU_THROW(NotSupportedError, "Device does not support VK_EXT_shader_subgroup_ballot extension"); } diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp index 96b67f8..572387e 100644 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp @@ -1056,8 +1056,8 @@ bool vkt::subgroups::isFormatSupportedForDevice(Context& context, vk::VkFormat f features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; features2.pNext = DE_NULL; - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_shader_subgroup_extended_types") && - isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_shader_float16_int8")) + if (context.isDeviceFunctionalitySupported("VK_KHR_shader_subgroup_extended_types") && + context.isDeviceFunctionalitySupported("VK_KHR_shader_float16_int8")) { features2.pNext = &subgroupExtendedTypesFeatures; subgroupExtendedTypesFeatures.pNext = &float16Int8Features; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp index e4f895b..d4308b3 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp @@ -614,7 +614,7 @@ void supportedCheck (Context& context, CaseDefinition caseDef) if (caseDef.opType > OPTYPE_LAST_NON_ARB) { - context.requireDeviceExtension("VK_EXT_shader_subgroup_vote"); + context.requireDeviceFunctionality("VK_EXT_shader_subgroup_vote"); } *caseDef.geometryPointSizeSupported = subgroups::isTessellationAndGeometryPointSizeSupported(context); @@ -641,7 +641,7 @@ tcu::TestStatus noSSBOtest (Context& context, const CaseDefinition caseDef) if (caseDef.opType > OPTYPE_LAST_NON_ARB) { - context.requireDeviceExtension("VK_EXT_shader_subgroup_vote"); + context.requireDeviceFunctionality("VK_EXT_shader_subgroup_vote"); } subgroups::SSBOData inputData; diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp index 7929b9e..a6e9dcb 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp @@ -333,25 +333,25 @@ vk::Move createTestDevice (const Context& context, std::vector queueFamilyIndices (queueFamilyProperties.size(), 0xFFFFFFFFu); std::vector extensions; - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_dedicated_allocation")) + if (context.isDeviceFunctionalitySupported("VK_KHR_dedicated_allocation")) extensions.push_back("VK_KHR_dedicated_allocation"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_get_memory_requirements2")) + if (context.isDeviceFunctionalitySupported("VK_KHR_get_memory_requirements2")) extensions.push_back("VK_KHR_get_memory_requirements2"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_external_semaphore")) + if (context.isDeviceFunctionalitySupported("VK_KHR_external_semaphore")) extensions.push_back("VK_KHR_external_semaphore"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_external_memory")) + if (context.isDeviceFunctionalitySupported("VK_KHR_external_memory")) extensions.push_back("VK_KHR_external_memory"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_external_semaphore_fd")) + if (context.isDeviceFunctionalitySupported("VK_KHR_external_semaphore_fd")) extensions.push_back("VK_KHR_external_semaphore_fd"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_external_memory_fd")) + if (context.isDeviceFunctionalitySupported("VK_KHR_external_memory_fd")) extensions.push_back("VK_KHR_external_memory_fd"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_external_semaphore_win32")) + if (context.isDeviceFunctionalitySupported("VK_KHR_external_semaphore_win32")) extensions.push_back("VK_KHR_external_semaphore_win32"); - if (isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_external_memory_win32")) + if (context.isDeviceFunctionalitySupported("VK_KHR_external_memory_win32")) extensions.push_back("VK_KHR_external_memory_win32"); if (timelineSemaphores) @@ -1003,7 +1003,7 @@ SharingTestInstance::SharingTestInstance (Context& context, , m_supportWriteOp (makeOperationSupport(config.writeOp, config.resource)) , m_supportReadOp (makeOperationSupport(config.readOp, config.resource)) , m_notSupportedChecker (context, m_config, *m_supportWriteOp, *m_supportReadOp) - , m_getMemReq2Supported (vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_get_memory_requirements2")) + , m_getMemReq2Supported (context.isDeviceFunctionalitySupported("VK_KHR_get_memory_requirements2")) , m_instanceAndDeviceA (context, config) , m_instanceA (m_instanceAndDeviceA.getInstance()) @@ -1062,7 +1062,7 @@ tcu::TestStatus SharingTestInstance::iterate (void) const vk::Unique commandBufferA (createCommandBuffer(m_vkdA, *m_deviceA, *commandPoolA)); vk::SimpleAllocator allocatorA (m_vkdA, *m_deviceA, vk::getPhysicalDeviceMemoryProperties(m_vkiA, m_physicalDeviceA)); const std::vector deviceExtensionsA; - OperationContext operationContextA (m_context.getUsedApiVersion(), m_vkiA, m_vkdA, m_physicalDeviceA, *m_deviceA, allocatorA, deviceExtensionsA, m_context.getBinaryCollection(), m_pipelineCacheData); + OperationContext operationContextA (m_context, m_vkiA, m_vkdA, m_physicalDeviceA, *m_deviceA, allocatorA, deviceExtensionsA, m_context.getBinaryCollection(), m_pipelineCacheData); if (!checkQueueFlags(m_queueFamiliesA[m_queueANdx].queueFlags , m_supportWriteOp->getQueueFlags(operationContextA))) TCU_THROW(NotSupportedError, "Operation not supported by the source queue"); @@ -1072,7 +1072,7 @@ tcu::TestStatus SharingTestInstance::iterate (void) const vk::Unique commandBufferB (createCommandBuffer(m_vkdB, *m_deviceB, *commandPoolB)); vk::SimpleAllocator allocatorB (m_vkdB, *m_deviceB, vk::getPhysicalDeviceMemoryProperties(m_vkiB, m_physicalDeviceB)); const std::vector deviceExtensionsB; - OperationContext operationContextB (m_context.getUsedApiVersion(), m_vkiB, m_vkdB, m_physicalDeviceB, *m_deviceB, allocatorB, deviceExtensionsB, m_context.getBinaryCollection(), m_pipelineCacheData); + OperationContext operationContextB (m_context, m_vkiB, m_vkdB, m_physicalDeviceB, *m_deviceB, allocatorB, deviceExtensionsB, m_context.getBinaryCollection(), m_pipelineCacheData); if (!checkQueueFlags(m_queueFamiliesB[m_queueBNdx].queueFlags , m_supportReadOp->getQueueFlags(operationContextB))) TCU_THROW(NotSupportedError, "Operation not supported by the destination queue"); diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.cpp index de5a94d..8b552e8 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.cpp @@ -617,8 +617,7 @@ public: VkQueueFlags getQueueFlags (const OperationContext& context) const { - if (m_bufferOp == BUFFER_OP_FILL && - !isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_maintenance1")) + if (m_bufferOp == BUFFER_OP_FILL && !context.isDeviceFunctionalitySupported("VK_KHR_maintenance1")) { return VK_QUEUE_COMPUTE_BIT | VK_QUEUE_GRAPHICS_BIT; } @@ -4618,7 +4617,8 @@ private: } // anonymous ns OperationContext::OperationContext (Context& context, PipelineCacheData& pipelineCacheData) - : m_vki (context.getInstanceInterface()) + : m_context (context) + , m_vki (context.getInstanceInterface()) , m_vk (context.getDeviceInterface()) , m_physicalDevice (context.getPhysicalDevice()) , m_device (context.getDevice()) @@ -4631,7 +4631,8 @@ OperationContext::OperationContext (Context& context, PipelineCacheData& pipelin } OperationContext::OperationContext (Context& context, PipelineCacheData& pipelineCacheData, const DeviceInterface& vk, const VkDevice device, vk::Allocator& allocator) - : m_vki (context.getInstanceInterface()) + : m_context (context) + , m_vki (context.getInstanceInterface()) , m_vk (vk) , m_physicalDevice (context.getPhysicalDevice()) , m_device (device) @@ -4643,7 +4644,7 @@ OperationContext::OperationContext (Context& context, PipelineCacheData& pipelin { } -OperationContext::OperationContext (const deUint32 apiVersion, +OperationContext::OperationContext (Context& context, const vk::InstanceInterface& vki, const vk::DeviceInterface& vkd, vk::VkPhysicalDevice physicalDevice, @@ -4652,7 +4653,8 @@ OperationContext::OperationContext (const deUint32 apiVersion, const std::vector& deviceExtensions, vk::BinaryCollection& programCollection, PipelineCacheData& pipelineCacheData) - : m_vki (vki) + : m_context (context) + , m_vki (vki) , m_vk (vkd) , m_physicalDevice (physicalDevice) , m_device (device) @@ -4660,7 +4662,7 @@ OperationContext::OperationContext (const deUint32 apiVersion, , m_progCollection (programCollection) , m_pipelineCacheData (pipelineCacheData) , m_deviceExtensions (deviceExtensions) - , m_usedApiVersion (apiVersion) + , m_usedApiVersion (context.getUsedApiVersion()) { } diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.hpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.hpp index ef31262..7b9db4d 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.hpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperation.hpp @@ -138,7 +138,7 @@ public: const vk::VkDevice device, vk::Allocator& allocator); - OperationContext (const deUint32 apiVersion, + OperationContext (Context& context, const vk::InstanceInterface& vki, const vk::DeviceInterface& vkd, vk::VkPhysicalDevice physicalDevice, @@ -158,8 +158,13 @@ public: const std::vector& getDeviceExtensions (void) const { return m_deviceExtensions;} deUint32 getUsedApiVersion (void) const { return m_usedApiVersion; } + bool isDeviceFunctionalitySupported(const std::string& extension) const + { + return m_context.isDeviceFunctionalitySupported(extension); + } private: + const vkt::Context& m_context; const vk::InstanceInterface& m_vki; const vk::DeviceInterface& m_vk; const vk::VkPhysicalDevice m_physicalDevice; diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationWin32KeyedMutexTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationWin32KeyedMutexTests.cpp index fcdb9a2..22eb3a8 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationWin32KeyedMutexTests.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationWin32KeyedMutexTests.cpp @@ -1645,7 +1645,7 @@ tcu::TestStatus Win32KeyedMutexTestInstance::iterate (void) const vk::Unique commandBufferRead (allocateCommandBuffer(m_vkd, *m_device, *commandPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY)); vk::SimpleAllocator allocator (m_vkd, *m_device, vk::getPhysicalDeviceMemoryProperties(m_vki, m_physicalDevice)); const std::vector deviceExtensions; - OperationContext operationContext (m_context.getUsedApiVersion(), m_vki, m_vkd, m_physicalDevice, *m_device, allocator, deviceExtensions, m_context.getBinaryCollection(), m_pipelineCacheData); + OperationContext operationContext (m_context, m_vki, m_vkd, m_physicalDevice, *m_device, allocator, deviceExtensions, m_context.getBinaryCollection(), m_pipelineCacheData); if (!checkQueueFlags(m_queueFamilies[m_queueNdx].queueFlags, vk::VK_QUEUE_GRAPHICS_BIT)) TCU_THROW(NotSupportedError, "Operation not supported by the source queue"); diff --git a/external/vulkancts/modules/vulkan/tessellation/vktTessellationWindingTests.cpp b/external/vulkancts/modules/vulkan/tessellation/vktTessellationWindingTests.cpp index f1d81b0..452172e 100644 --- a/external/vulkancts/modules/vulkan/tessellation/vktTessellationWindingTests.cpp +++ b/external/vulkancts/modules/vulkan/tessellation/vktTessellationWindingTests.cpp @@ -404,7 +404,7 @@ WindingTestInstance::WindingTestInstance (Context& context, void WindingTestInstance::requireExtension (const char* name) const { - if(!isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), name)) + if(!m_context.isDeviceFunctionalitySupported(name)) TCU_THROW(NotSupportedError, (std::string(name) + " is not supported").c_str()); } diff --git a/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp b/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp index 8bef451..8e291ae 100644 --- a/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp +++ b/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp @@ -385,7 +385,7 @@ protected: TransformFeedbackTestInstance::TransformFeedbackTestInstance (Context& context, const TestParameters& parameters) : TestInstance (context) - , m_extensions (context.requireDeviceExtension("VK_EXT_transform_feedback")) + , m_extensions (context.requireDeviceFunctionality("VK_EXT_transform_feedback")) , m_imageExtent2D (makeExtent2D(IMAGE_SIZE, IMAGE_SIZE)) , m_parameters (parameters) , m_rnd (0) @@ -1468,7 +1468,7 @@ TransformFeedbackQueryTestInstance::TransformFeedbackQueryTestInstance (Context& if (m_parameters.testType == TEST_TYPE_QUERY_RESET) { // Check VK_EXT_host_query_reset is supported - m_context.requireDeviceExtension("VK_EXT_host_query_reset"); + m_context.requireDeviceFunctionality("VK_EXT_host_query_reset"); if(m_context.getHostQueryResetFeatures().hostQueryReset == VK_FALSE) throw tcu::NotSupportedError(std::string("Implementation doesn't support resetting queries from the host").c_str()); } diff --git a/external/vulkancts/modules/vulkan/vktCustomInstancesDevices.cpp b/external/vulkancts/modules/vulkan/vktCustomInstancesDevices.cpp index ef13a91..5d44b8e 100644 --- a/external/vulkancts/modules/vulkan/vktCustomInstancesDevices.cpp +++ b/external/vulkancts/modules/vulkan/vktCustomInstancesDevices.cpp @@ -228,7 +228,7 @@ CustomInstance createCustomInstanceWithExtensions (Context& context, const std:: for (const auto& ext : extensions) { - if (!vk::isInstanceExtensionSupported(apiVersion, availableExtensions, vk::RequiredExtension(ext))) + if (!context.isInstanceFunctionalitySupported(ext)) TCU_THROW(NotSupportedError, ext + " is not supported"); if (!vk::isCoreInstanceExtension(apiVersion, ext)) diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp index 30db1a9..aa0009c 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.cpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp @@ -409,6 +409,25 @@ deUint32 Context::getDeviceVersion (void) const { return m_device->ge const vk::VkPhysicalDeviceFeatures& Context::getDeviceFeatures (void) const { return m_device->getDeviceFeatures(); } const vk::VkPhysicalDeviceFeatures2& Context::getDeviceFeatures2 (void) const { return m_device->getDeviceFeatures2(); } +bool Context::isDeviceFunctionalitySupported (const std::string& extension) const +{ + // check if extension was promoted to core + if (isCoreDeviceExtension(getUsedApiVersion(), extension)) + return true; + + // check if extension is on the lits of extensions for current device + const auto& extensions = getDeviceExtensions(); + return de::contains(extensions.begin(), extensions.end(), extension); +} + +bool Context::isInstanceFunctionalitySupported(const std::string& extension) const +{ + // NOTE: current implementation uses isInstanceExtensionSupported but + // this will change when some instance extensions will be promoted to the + // core; don't use isInstanceExtensionSupported directly, use this method instead + return isInstanceExtensionSupported(getUsedApiVersion(), getInstanceExtensions(), extension); +} + #include "vkDeviceFeaturesForContextDefs.inl" const vk::VkPhysicalDeviceProperties& Context::getDeviceProperties (void) const { return m_device->getDeviceProperties(); } @@ -428,17 +447,17 @@ bool Context::contextSupports (const ApiVersion version) const bool Context::contextSupports (const deUint32 requiredApiVersionBits) const { return m_device->getUsedApiVersion() >= requiredApiVersionBits; } -bool Context::requireDeviceExtension (const std::string& required) +bool Context::requireDeviceFunctionality (const std::string& required) { - if (!isDeviceExtensionSupported(getUsedApiVersion(), getDeviceExtensions(), required)) + if (!isDeviceFunctionalitySupported(required)) TCU_THROW(NotSupportedError, required + " is not supported"); return true; } -bool Context::requireInstanceExtension (const std::string& required) +bool Context::requireInstanceFunctionality (const std::string& required) { - if (!isInstanceExtensionSupported(getUsedApiVersion(), getInstanceExtensions(), required)) + if (!isInstanceFunctionalitySupported(required)) TCU_THROW(NotSupportedError, required + " is not supported"); return true; diff --git a/external/vulkancts/modules/vulkan/vktTestCase.hpp b/external/vulkancts/modules/vulkan/vktTestCase.hpp index 0e55344..b6635ad 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.hpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.hpp @@ -75,6 +75,9 @@ public: const vk::VkPhysicalDeviceFeatures& getDeviceFeatures (void) const; const vk::VkPhysicalDeviceFeatures2& getDeviceFeatures2 (void) const; + bool isInstanceFunctionalitySupported (const std::string& extension) const; + bool isDeviceFunctionalitySupported (const std::string& extension) const; + #include "vkDeviceFeaturesForContextDecl.inl" const vk::VkPhysicalDeviceProperties& getDeviceProperties (void) const; @@ -90,8 +93,8 @@ public: bool contextSupports (const deUint32 majorNum, const deUint32 minorNum, const deUint32 patchNum) const; bool contextSupports (const vk::ApiVersion version) const; bool contextSupports (const deUint32 requiredApiVersionBits) const; - bool requireDeviceExtension (const std::string& required); - bool requireInstanceExtension (const std::string& required); + bool requireDeviceFunctionality (const std::string& required); + bool requireInstanceFunctionality (const std::string& required); bool requireDeviceCoreFeature (const DeviceCoreFeature requiredDeviceCoreFeature); void* getInstanceProcAddr (); diff --git a/external/vulkancts/modules/vulkan/vktTestPackage.cpp b/external/vulkancts/modules/vulkan/vktTestPackage.cpp index 242ff79..78e074b 100644 --- a/external/vulkancts/modules/vulkan/vktTestPackage.cpp +++ b/external/vulkancts/modules/vulkan/vktTestPackage.cpp @@ -364,7 +364,7 @@ bool TestCaseExecutor::spirvVersionSupported (vk::SpirvVersion spirvVersion) return true; if (spirvVersion <= vk::SPIRV_VERSION_1_4) - return vk::isDeviceExtensionSupported(m_context.getUsedApiVersion(), m_context.getDeviceExtensions(), "VK_KHR_spirv_1_4"); + return m_context.isDeviceFunctionalitySupported("VK_KHR_spirv_1_4"); return false; } diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiSurfaceTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiSurfaceTests.cpp index c5fe166..cbcaf76 100644 --- a/external/vulkancts/modules/vulkan/wsi/vktWsiSurfaceTests.cpp +++ b/external/vulkancts/modules/vulkan/wsi/vktWsiSurfaceTests.cpp @@ -171,7 +171,6 @@ struct CheckPhysicalDeviceSurfacePresentModesIncompleteResult : public CheckInco typedef vector Extensions; CustomInstance createInstanceWithWsi (Context& context, - const Extensions& supportedExtensions, Type wsiType, const vector extraExtensions, const VkAllocationCallbacks* pAllocator = DE_NULL) @@ -188,7 +187,7 @@ CustomInstance createInstanceWithWsi (Context& context, extensionName != extensions.end(); ++extensionName) { - if (!isInstanceExtensionSupported(version, supportedExtensions, RequiredExtension(*extensionName))) + if (!context.isInstanceFunctionalitySupported(*extensionName)) TCU_THROW(NotSupportedError, (*extensionName + " is not supported").c_str()); if (!isCoreInstanceExtension(version, *extensionName)) @@ -208,7 +207,6 @@ struct InstanceHelper : supportedExtensions (enumerateInstanceExtensionProperties(context.getPlatformInterface(), DE_NULL)) , instance (createInstanceWithWsi(context, - supportedExtensions, wsiType, vector(), pAllocator)) @@ -219,7 +217,6 @@ struct InstanceHelper : supportedExtensions (enumerateInstanceExtensionProperties(context.getPlatformInterface(), DE_NULL)) , instance (createInstanceWithWsi(context, - supportedExtensions, wsiType, extensions, pAllocator)) diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp index 332ecfb..34eb45f 100644 --- a/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp +++ b/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp @@ -1436,10 +1436,8 @@ public: DE_UNREF(deviceMask); // needed for compatibility with acquireNextImage2KHR } - bool featureAvailable(const deUint32 deviceVersion, const Extensions& supportedExtensions) + bool featureAvailable(Context&) { - DE_UNREF(deviceVersion); - DE_UNREF(supportedExtensions); return true; // needed for compatibility with acquireNextImage2KHR } @@ -1482,9 +1480,9 @@ public: m_info.deviceMask = deviceMask; } - bool featureAvailable(const deUint32 deviceVersion, const Extensions& supportedExtensions) + bool featureAvailable(Context& context) { - return isDeviceExtensionSupported(deviceVersion, supportedExtensions, RequiredExtension("VK_KHR_device_group")); + return context.isDeviceFunctionalitySupported("VK_KHR_device_group"); } VkResult call(VkSemaphore semaphore, VkFence fence, deUint32* imageIndex) @@ -1520,7 +1518,7 @@ tcu::TestStatus basicRenderTest (Context& context, Type wsiType) const vector swapchainImages = getSwapchainImages(vkd, device, *swapchain); AcquireWrapperType acquireImageWrapper(vkd, device, 1u, *swapchain, std::numeric_limits::max()); - if (!acquireImageWrapper.featureAvailable(context.getUsedApiVersion(), instHelper.supportedExtensions)) + if (!acquireImageWrapper.featureAvailable(context)) TCU_THROW(NotSupportedError, "Required extension is not supported"); const TriangleRenderer renderer (vkd, diff --git a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp index a744f7b..821f4eb 100644 --- a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp +++ b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp @@ -577,7 +577,7 @@ void logTestCaseInfo (TestLog& log, const TestConfig& config) void checkSupport (Context& context, const TestConfig config) { #if !defined(FAKE_COLOR_CONVERSION) - if (!vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_sampler_ycbcr_conversion")) + if (!context.isDeviceFunctionalitySupported("VK_KHR_sampler_ycbcr_conversion")) TCU_THROW(NotSupportedError, "Extension VK_KHR_sampler_ycbcr_conversion not supported"); try diff --git a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrFormatTests.cpp b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrFormatTests.cpp index a3a68f9..3e8b885 100644 --- a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrFormatTests.cpp +++ b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrFormatTests.cpp @@ -295,7 +295,7 @@ void checkSupport (Context& context, const TestParameters params) if (params.useArrayLayers) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_ycbcr_image_arrays")) + if (!context.isDeviceFunctionalitySupported("VK_EXT_ycbcr_image_arrays")) TCU_THROW(NotSupportedError, "VK_EXT_ycbcr_image_arrays is not supported"); VkImageFormatProperties properties = getPhysicalDeviceImageFormatProperties(context.getInstanceInterface(), context.getPhysicalDevice(), diff --git a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrUtil.cpp b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrUtil.cpp index 666f969..1d90102 100644 --- a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrUtil.cpp +++ b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrUtil.cpp @@ -213,10 +213,10 @@ void checkImageSupport (Context& context, VkFormat format, VkImageCreateFlags cr reqExts.push_back("VK_KHR_get_memory_requirements2"); } - for (vector::const_iterator extIter = reqExts.begin(); extIter != reqExts.end(); ++extIter) + for (const string& ext : reqExts) { - if (!isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), *extIter)) - TCU_THROW(NotSupportedError, (*extIter + " is not supported").c_str()); + if (!context.isDeviceFunctionalitySupported(ext)) + TCU_THROW(NotSupportedError, (ext + " is not supported").c_str()); } if (features.samplerYcbcrConversion == VK_FALSE) diff --git a/external/vulkancts/scripts/gen_framework.py b/external/vulkancts/scripts/gen_framework.py index 95cc808..fc6868d 100644 --- a/external/vulkancts/scripts/gen_framework.py +++ b/external/vulkancts/scripts/gen_framework.py @@ -1641,7 +1641,7 @@ def writeMandatoryFeatures(filename): dictStructs[m[0]].append(allRequirements[0]) stream.extend(['bool checkMandatoryFeatures(const vkt::Context& context)\n{', - '\tif ( !vk::isInstanceExtensionSupported(context.getUsedApiVersion(), context.getInstanceExtensions(), "VK_KHR_get_physical_device_properties2") )', + '\tif ( !context.isInstanceFunctionalitySupported("VK_KHR_get_physical_device_properties2") )', '\t\tTCU_THROW(NotSupportedError, "Extension VK_KHR_get_physical_device_properties2 is not present");', '', '\tVkPhysicalDevice\t\t\t\t\tphysicalDevice\t\t= context.getPhysicalDevice();', -- 2.7.4