Check for graphics pipeline library support in FSR tests
authorRicardo Garcia <rgarcia@igalia.com>
Tue, 5 Apr 2022 09:01:47 +0000 (11:01 +0200)
committerMatthew Netsch <mnetsch@qti.qualcomm.com>
Fri, 8 Apr 2022 19:57:35 +0000 (19:57 +0000)
Fragment shading rate test variants using graphics pipeline library
were not checking for the extension to be supported.

Affected tests:
dEQP-VK.fragment_shading_rate.*.pipeline_library.*
dEQP-VK.fragment_shading_rate.*.fast_linked_library.*

Components: Vulkan
VK-GL-CTS issue: 3605

Change-Id: Iaa825424f4801ed0a38a78dfdacff533877506fb

external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRateBasic.cpp

index 9c5bae3..954bb68 100644 (file)
@@ -252,9 +252,12 @@ void FSRTestCase::checkSupport(Context& context) const
                m_data.combinerOp[1] != VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR)
                TCU_THROW(NotSupportedError, "attachmentFragmentShadingRate not supported");
 
+       const auto&     vki                             = context.getInstanceInterface();
+       const auto      physicalDevice  = context.getPhysicalDevice();
+
        VkImageFormatProperties imageProperties;
-       VkResult result = context.getInstanceInterface().getPhysicalDeviceImageFormatProperties(context.getPhysicalDevice(), VK_FORMAT_R32G32B32A32_UINT, VK_IMAGE_TYPE_2D,
-                                                                                                                                                                                       VK_IMAGE_TILING_OPTIMAL, cbUsage, 0, &imageProperties);
+       VkResult result = vki.getPhysicalDeviceImageFormatProperties(physicalDevice, VK_FORMAT_R32G32B32A32_UINT, VK_IMAGE_TYPE_2D,
+                                                                                                                                VK_IMAGE_TILING_OPTIMAL, cbUsage, 0, &imageProperties);
 
        if (result == VK_ERROR_FORMAT_NOT_SUPPORTED)
                TCU_THROW(NotSupportedError, "VK_FORMAT_R32G32B32A32_UINT not supported");
@@ -313,6 +316,8 @@ void FSRTestCase::checkSupport(Context& context) const
 
        if (m_data.sampleMaskTest && !context.getFragmentShadingRateProperties().fragmentShadingRateWithSampleMask)
                TCU_THROW(NotSupportedError, "fragmentShadingRateWithSampleMask not supported");
+
+       checkPipelineLibraryRequirements(vki, physicalDevice, m_data.pipelineConstructionType);
 }
 
 // Error codes writted by the fragment shader