Skip anisotropic filtering tests if the feature is not supported.
authorAlexander Galazin <alexander.galazin@arm.com>
Mon, 9 Jan 2017 14:17:02 +0000 (15:17 +0100)
committerAlexander Galazin <alexander.galazin@arm.com>
Mon, 9 Jan 2017 15:46:32 +0000 (16:46 +0100)
dEQP-VK.texture.filtering_anisotropy.* tests assume that an
implementation supports anisotropic filtering and should be skipped in
case VkPhysicalDeviceFeatures::samplerAnisotropy is VK_FALSE.

Fixes #570

Change-Id: I0601fe67a0e81b71670dac7ec8b83b4dc35c576c

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

index 2946477..8747e54 100644 (file)
@@ -99,6 +99,10 @@ public:
 
        tcu::TestStatus iterate (void)
        {
+               // Check device for anisotropic filtering support
+               if (!m_context.getDeviceFeatures().samplerAnisotropy)
+                       TCU_THROW(NotSupportedError, "Skipping anisotropic tests since the device does not support anisotropic filtering.");
+
                TextureRenderer renderer        (m_context, VK_SAMPLE_COUNT_1_BIT, ANISOTROPY_TEST_RESOLUTION, ANISOTROPY_TEST_RESOLUTION);
                TestTexture2DSp texture         = TestTexture2DSp(new pipeline::TestTexture2D(vk::mapVkFormat(VK_FORMAT_R8G8B8A8_UNORM), ANISOTROPY_TEST_RESOLUTION, ANISOTROPY_TEST_RESOLUTION));