From ac1cc9998bdf46d0dcab6dc05b4e4668833e8c93 Mon Sep 17 00:00:00 2001 From: Boris Zanin Date: Tue, 1 Mar 2022 16:16:12 +0100 Subject: [PATCH] Disable BC7 mode 8 pattern generation Due to BC7 is underspecified for mode 8 (LSB=0x00) tests should avoid testing it. This commit avoids generation mode 8 BC7 compressed blocks. Affects tests: * dEQP-VK.*bc7* Components: Framework, Vulkan VK-GL-CTS issue: 3501 Change-Id: I222046f703fbead2bf5c64376defc6481989be24 --- .../vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp index 34c6eb4..67fe2ea 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp @@ -961,6 +961,16 @@ void TestTexture::populateCompressedLevels (tcu::CompressedTexFormat format, con if (format != tcu::COMPRESSEDTEXFORMAT_ETC1_RGB8) for (int byteNdx = 0; byteNdx < compressedLevel->getDataSize(); byteNdx++) compressedData[byteNdx] = 0xFF & random.getUint32(); + + // BC7 mode 8 (LSB==0x00) should not be tested as it is underspecified + if (format == tcu::COMPRESSEDTEXFORMAT_BC7_UNORM_BLOCK || format == tcu::COMPRESSEDTEXFORMAT_BC7_SRGB_BLOCK) + { + const int blockSize = tcu::getBlockSize(format); + + for (int byteNdx = 0; byteNdx < compressedLevel->getDataSize(); byteNdx += blockSize) + while (compressedData[byteNdx] == 0x00) + compressedData[byteNdx] = 0xFF & random.getUint32(); + } } m_compressedLevels.push_back(compressedLevel); -- 2.7.4