Add missing feature check
authorIlkka Saarelainen <ilkka.saarelainen@siru.fi>
Thu, 23 Dec 2021 06:39:55 +0000 (08:39 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Sun, 16 Jan 2022 00:15:03 +0000 (00:15 +0000)
Some of the buffer memory requirement tests were using
vkGetBufferMemoryRequirements2 function and not checking
if the required feature/extension is enabled.

This CL adds the feature check.

Components: Vulkan

Affects:

dEQP-VK.api.buffer_memory_requirements.*.method2.*

VK-GL-CTS Issue: 3301

Change-Id: Ic99ab4d39a03cd3ec035a17a1c27aceeafa1e69a

external/vulkancts/modules/vulkan/api/vktApiBufferMemoryRequirementsTests.cpp

index 4632cbb..479d249 100644 (file)
@@ -323,6 +323,9 @@ void MemoryRequirementsTest::checkSupport (Context& context) const
        const VkPhysicalDevice                                                  physDevice                      = context.getPhysicalDevice();
        const std::vector<VkExtensionProperties>                supportedExtensions = enumerateDeviceExtensionProperties(intf, physDevice, nullptr);
 
+       if (m_testConfig.useMethod2)
+               context.requireDeviceFunctionality("VK_KHR_get_memory_requirements2");
+
        VkPhysicalDeviceProtectedMemoryFeatures                 protectedMemFeatures
        {
                vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES,        // VkStructureType      sType;