diff options
author | Mikel Garai <mikel.garai@arm.com> | 2020-06-03 14:28:34 +0200 |
---|---|---|
committer | Alexander Galazin <Alexander.Galazin@arm.com> | 2020-06-11 12:39:15 -0400 |
commit | 8543f8a37ded5a1bd31f627ecede80d1da79d866 (patch) | |
tree | 77d4c7b732d5cff7431e1197a6a75d2f1860d713 | |
parent | d027d1b5385d4366212ea8cdeedcb6825a2013d2 (diff) | |
download | deqp-8543f8a37ded5a1bd31f627ecede80d1da79d866.tar.gz |
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)
-rw-r--r-- | external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp index f52dc1d8c..e699849f2 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp @@ -2650,9 +2650,9 @@ tcu::TestStatus imageFormatProperties (Context& context, const VkFormat format, 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; |