From 1084d0adc0bf29252b46b5d4bd4f2e3abed508d7 Mon Sep 17 00:00:00 2001 From: Jorg Wagner Date: Thu, 15 Dec 2016 22:52:06 +0100 Subject: [PATCH] Skip integer formats that expose a max. sample count of 1 Actually fixes #538 As agreed in the ticket we need to skip integer formats if they need to be sampled and only expose a max. sample count of 1. Change-Id: Ia67c8d84cedcae09804e83cfefeb279b329d07b9 --- .../shaderrender/vktShaderRenderTextureFunctionTests.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTextureFunctionTests.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTextureFunctionTests.cpp index d775e3c..dbd8b83 100644 --- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTextureFunctionTests.cpp +++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderTextureFunctionTests.cpp @@ -1707,7 +1707,7 @@ TextureSamplesInstance::TextureSamplesInstance (Context& context, // Its Dim operand must be one of 2D and **MS of 1(multisampled). // // "MS of 1" implies the image must not be single-sample, meaning we must exclude - // VK_SAMPLE_COUNT_1_BIT in the sampleFlags array below. + // VK_SAMPLE_COUNT_1_BIT in the sampleFlags array below, and may have to skip further testing. static const vk::VkSampleCountFlagBits sampleFlags[] = { vk::VK_SAMPLE_COUNT_2_BIT, @@ -1726,7 +1726,17 @@ TextureSamplesInstance::TextureSamplesInstance (Context& context, m_iterations.push_back(flag); } - DE_ASSERT(!m_iterations.empty()); + if (m_iterations.empty()) + { + // Sampled images of integer formats may support only 1 sample. Exit the test with "Not supported" in these cases. + if (tcu::getTextureChannelClass(mapVkFormat(format).type) == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER || + tcu::getTextureChannelClass(mapVkFormat(format).type) == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER) + { + TCU_THROW(NotSupportedError, "Skipping validation of integer formats as only VK_SAMPLE_COUNT_1_BIT is supported."); + } + + DE_ASSERT(false); + } } // setup texture -- 2.7.4