From b59d45bb587ceb809e8e4804f16977f186f49f1a Mon Sep 17 00:00:00 2001 From: Graeme Leese Date: Thu, 4 Mar 2021 21:29:59 +0000 Subject: [PATCH] Enable shadow filtering tests for non-filterable formats The spec says that you don't need to be able to filter the actual format in order to filter the results of a shadow comparison. Enable this in the texture tests. Component: Vulkan VK-GL-CTS issue: 2834 Affects: dEQP-VK.texture.shadow.* Change-Id: I0879d8e77b84493d0be9677e9b4811a240c812b5 --- .../vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp b/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp index 14b2cbebb..477f5a42a 100644 --- a/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp +++ b/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp @@ -1251,7 +1251,8 @@ void TextureRenderer::renderQuad (tcu::Surface& result, samplerCreateInfo.maxAnisotropy = maxAnisotropy; } - if (samplerCreateInfo.magFilter == VK_FILTER_LINEAR || samplerCreateInfo.minFilter == VK_FILTER_LINEAR || samplerCreateInfo.mipmapMode == VK_SAMPLER_MIPMAP_MODE_LINEAR) + bool linFilt = (samplerCreateInfo.magFilter == VK_FILTER_LINEAR || samplerCreateInfo.minFilter == VK_FILTER_LINEAR || samplerCreateInfo.mipmapMode == VK_SAMPLER_MIPMAP_MODE_LINEAR); + if (linFilt && samplerCreateInfo.compareEnable == VK_FALSE) { const pipeline::TestTexture& testTexture = m_textureBindings[texUnit]->getTestTexture(); const VkFormat textureFormat = testTexture.isCompressed() ? mapCompressedTextureFormat(testTexture.getCompressedLevel(0, 0).getFormat()) -- 2.34.1