vulkan: fix back compat with Android Oreo and below
authorYiwei Zhang <zzyiwei@chromium.org>
Thu, 10 Jun 2021 16:26:01 +0000 (16:26 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 17:41:34 +0000 (17:41 +0000)
buffer_handle_t definition was previously inside the deprecated
system/core/include/system/window.h.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11301>

include/vulkan/vk_android_native_buffer.h

index 17bfd11..52d7a94 100644 (file)
 #ifdef ANDROID
 #include <cutils/native_handle.h>
 #include <vulkan/vulkan.h>
+
+#if ANDROID_API_LEVEL < 28
+/* buffer_handle_t was defined in the deprecated system/window.h */
+typedef const native_handle_t *buffer_handle_t;
+#endif
+
 #else
 typedef void *buffer_handle_t;
 #endif