blob: 294fac10f2750e064c1ef111b6b7925df8c7fc0f [file] [log] [blame]
From 63424306dddf923997d2163c1a51525fd7f171f8 Mon Sep 17 00:00:00 2001
From: Yiwei Zhang <zzyiwei@chromium.org>
Date: Tue, 31 Aug 2021 20:04:41 +0000
Subject: [PATCH] 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@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12639>
---
src/virtio/vulkan/vn_device.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/virtio/vulkan/vn_device.c b/src/virtio/vulkan/vn_device.c
index c99eaf8e802..83cf08bd2ea 100644
--- a/src/virtio/vulkan/vn_device.c
+++ b/src/virtio/vulkan/vn_device.c
@@ -2902,6 +2902,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 =
--
2.33.0.153.gba50c8fa24-goog