Fix checking support in texture filtering tests
authorziga-lunarg <ziga@lunarg.com>
Sun, 19 Feb 2023 12:27:26 +0000 (13:27 +0100)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Thu, 9 Mar 2023 18:04:16 +0000 (18:04 +0000)
The tests use mipmaps even if the test parameter for mipmaps is false
and the check support function does not do that

Components: Vulkan

VK-GL-CTS issue: 4294

Affected tests:
dEQP-VK.texture.filtering.2d_array.*

Change-Id: Iabd33803fc952f3ea4c7598674fd9f58b53070d4

external/vulkancts/modules/vulkan/texture/vktTextureFilteringTests.cpp

index f3ec40f..e441ab8 100644 (file)
@@ -128,7 +128,8 @@ void checkTextureSupport (Context& context, const Texture2DArrayTestCaseParamete
                context.requireDeviceFunctionality("VK_KHR_sampler_mirror_clamp_to_edge");
 
 #ifndef CTS_USES_VULKANSC
-       if (testParameters.format == VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 && testParameters.mipmaps && context.getRGBA10X6FormatsFeaturesEXT().formatRgba10x6WithoutYCbCrSampler == VK_FALSE)
+       bool mipmaps = (deLog2Floor32(de::max(testParameters.width, testParameters.height)) + 1) > 1 || testParameters.mipmaps;
+       if (testParameters.format == VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 && mipmaps && context.getRGBA10X6FormatsFeaturesEXT().formatRgba10x6WithoutYCbCrSampler == VK_FALSE)
                TCU_THROW(NotSupportedError, "formatRgba10x6WithoutYCbCrSampler not supported");
 #endif
 }