From a2090098fa72a3333d32d75c10fe4e2be08b6fbc Mon Sep 17 00:00:00 2001 From: Ari Suonpaa Date: Tue, 14 Sep 2021 13:08:37 +0300 Subject: [PATCH] Fix AHB external memory test mip levels AHB external memory tests were testing mipmaps using a queried maximum number of supported mipmap levels, but at the same time using an image size of 64x64. The number of mip levels need to match the number for a full mip chain, in this case 7. Now a correct number of mip levels is used, which also gets rid of a validation error. VK-GL-CTS Issue: 3112 Affects: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.* Components: Vulkan Change-Id: I1c6d09f93c06ac1c52cea283fd86359ccde01e4f --- external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp index f30ca2f..2ec1717 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp @@ -4169,9 +4169,9 @@ tcu::TestStatus testAndroidHardwareBufferImageFormat (Context& context, vk::VkF context.getTestContext().touchWatchdog(); } - if (properties.imageFormatProperties.maxMipLevels > 1u) + if (properties.imageFormatProperties.maxMipLevels >= 7u) { - const vk::Unique image (createExternalImage(vkd, *device, queueFamilyIndex, externalMemoryType, format, 64u, 64u, tiling, createFlag, usage, properties.imageFormatProperties.maxMipLevels)); + const vk::Unique image (createExternalImage(vkd, *device, queueFamilyIndex, externalMemoryType, format, 64u, 64u, tiling, createFlag, usage, 7u)); const vk::VkMemoryRequirements requirements (getImageMemoryRequirements(vkd, *device, *image, externalMemoryType)); const deUint32 exportedMemoryTypeIndex (chooseMemoryType(requirements.memoryTypeBits)); const vk::Unique memory (allocateExportableMemory(vkd, *device, requirements.size, exportedMemoryTypeIndex, externalMemoryType, *image)); -- 2.7.4