Mesa (main): venus: set maxMipLevels to 1 for ahb images

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 31 21:59:31 UTC 2021


Module: Mesa
Branch: main
Commit: 4a2adb36ae401928cc9dab02bcaa5416ba52a6ae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a2adb36ae401928cc9dab02bcaa5416ba52a6ae

Author: Yiwei Zhang <zzyiwei at chromium.org>
Date:   Tue Aug 31 20:04:41 2021 +0000

venus: set maxMipLevels to 1 for ahb images

Fixes: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.*

Cc: 21.2.2 mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei at chromium.org>
Reviewed-by: Chia-I Wu <olvaffe at gmail.com>
Reviewed-by: Ryan Neph <ryanneph at google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12639>

---

 src/virtio/vulkan/vn_physical_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c
index 4ca5f3896b0..fb5d4e1b599 100644
--- a/src/virtio/vulkan/vn_physical_device.c
+++ b/src/virtio/vulkan/vn_physical_device.c
@@ -2173,6 +2173,9 @@ vn_GetPhysicalDeviceImageFormatProperties2(
          ahb_usage->androidHardwareBufferUsage = vn_android_get_ahb_usage(
             pImageFormatInfo->usage, pImageFormatInfo->flags);
       }
+
+      /* AHBs with mipmap usage will ignore this property */
+      pImageFormatProperties->imageFormatProperties.maxMipLevels = 1;
    } else {
       mem_props->compatibleHandleTypes = supported_handle_types;
       mem_props->exportFromImportedHandleTypes =



More information about the mesa-commit mailing list