From: Ari Suonpaa Date: Tue, 14 Sep 2021 10:08:37 +0000 (+0300) Subject: Fix AHB external memory test mip levels X-Git-Tag: upstream/1.3.5~550^2~5^2^2^2^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2090098fa72a3333d32d75c10fe4e2be08b6fbc;p=platform%2Fupstream%2FVK-GL-CTS.git 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 --- 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));