Fix maxMipMap calculation for images
This change uses the floor of the log2 instead of the ceiling as
described in vulkan specification for normal images.
Vulkan spec section: 11.3.3. Image Miplevel Sizing
Components: Vulkan
Affects:
dEQP-VK.api.info.image_format_properties.*
VK-GL-CTS Issue: 2407
Change-Id: Ic5c7afe5890ebf1b5cc00abd1534a4a4d0c9c3c9
(cherry picked from commit 3d81feb1d686a02a92ad0d1e8bd519869c2d700a)
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
index f52dc1d..e699849 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
@@ -2650,9 +2650,9 @@
if (queryResult == VK_SUCCESS)
{
- const deUint32 fullMipPyramidSize = de::max(de::max(deLog2Ceil32(properties.maxExtent.width),
- deLog2Ceil32(properties.maxExtent.height)),
- deLog2Ceil32(properties.maxExtent.depth)) + 1;
+ const deUint32 fullMipPyramidSize = de::max(de::max(deLog2Floor32(properties.maxExtent.width),
+ deLog2Floor32(properties.maxExtent.height)),
+ deLog2Floor32(properties.maxExtent.depth)) + 1;
log << TestLog::Message << properties << "\n" << TestLog::EndMessage;