Require VK_EXT_filter_cubic for cubic filtering
authorJames Fitzpatrick <james.fitzpatrick@imgtec.com>
Fri, 12 Jun 2020 10:12:28 +0000 (11:12 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 17 Jun 2020 09:17:23 +0000 (05:17 -0400)
Make the copy and blit tests for cubic filtering depend on
VK_EXT_filter_cubic to stop them being run on drivers supporting
VK_IMG_filter_cubic.

Affects:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.*
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.generate_mipmaps.*
dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.all_formats.color.*
dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.all_formats.generate_mipmaps.*

Components: Vulkan

VK-GL-CTS issue: 2417

Change-Id: I3b2b689410603d639837bed48fa8f7e924da577c

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

index e15dde2..f383a54 100644 (file)
@@ -3036,9 +3036,14 @@ public:
                        TCU_THROW(NotSupportedError, "Source format feature sampled image filter linear not supported");
                }
 
-               if (m_params.filter == VK_FILTER_CUBIC_EXT && !(srcFormatFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT))
+               if (m_params.filter == VK_FILTER_CUBIC_EXT)
                {
-                       TCU_THROW(NotSupportedError, "Source format feature sampled image filter cubic not supported");
+                       context.requireDeviceFunctionality("VK_EXT_filter_cubic");
+
+                       if (!(srcFormatFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT))
+                       {
+                               TCU_THROW(NotSupportedError, "Source format feature sampled image filter cubic not supported");
+                       }
                }
        }
 
@@ -3725,8 +3730,15 @@ public:
                if (m_params.filter == VK_FILTER_LINEAR && !(srcFormatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT))
                        TCU_THROW(NotSupportedError, "Source format feature sampled image filter linear not supported");
 
-               if (m_params.filter == VK_FILTER_CUBIC_EXT && !(srcFormatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT))
-                       TCU_THROW(NotSupportedError, "Source format feature sampled image filter cubic not supported");
+               if (m_params.filter == VK_FILTER_CUBIC_EXT)
+               {
+                       context.requireDeviceFunctionality("VK_EXT_filter_cubic");
+
+                       if (!(srcFormatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT))
+                       {
+                               TCU_THROW(NotSupportedError, "Source format feature sampled image filter cubic not supported");
+                       }
+               }
        }
 
 private: