From: Vihanakangas Date: Mon, 4 Oct 2021 10:52:27 +0000 (+0300) Subject: Move anisotropic filtering support check to a function X-Git-Tag: upstream/1.3.5~332^2~54^2^2~2^2^2~3^2~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56cf99a87eae0762ca773b429f29d5b9a11b5199;p=platform%2Fupstream%2FVK-GL-CTS.git Move anisotropic filtering support check to a function Support check for anisotropic filtering was done inside of iterate. This change moves that check inside of a function for consistency and performance. Affects: dEQP-VK.texture.filtering_anisotropy.* Components: Vulkan VK-GL-CTS issue: 3068 Change-Id: I3a1c0a1acff96b6f6b291bb53d3d9dc0bd122c17 (cherry picked from commit 522f4ba64beee8828030320591d20faa027a8e0a) --- diff --git a/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp b/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp index c9582b0..113a54e 100644 --- a/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp +++ b/external/vulkancts/modules/vulkan/texture/vktTextureFilteringAnisotropyTests.cpp @@ -99,10 +99,6 @@ 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)); @@ -176,6 +172,14 @@ public: { return new FilteringAnisotropyInstance(context, m_refParams); } + + virtual void checkSupport (Context& context) const + { + // Check device for anisotropic filtering support. + if (!context.getDeviceFeatures().samplerAnisotropy) + TCU_THROW(NotSupportedError, "Skipping anisotropic tests since the device does not support anisotropic filtering."); + } + private : const AnisotropyParams m_refParams; };