Mesa (main): vulkan: fix back compat with Android Oreo and below

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 10 18:05:05 UTC 2021


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

Author: Yiwei Zhang <zzyiwei at chromium.org>
Date:   Thu Jun 10 16:26:01 2021 +0000

vulkan: fix back compat with Android Oreo and below

buffer_handle_t definition was previously inside the deprecated
system/core/include/system/window.h.

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

---

 include/vulkan/vk_android_native_buffer.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/vulkan/vk_android_native_buffer.h b/include/vulkan/vk_android_native_buffer.h
index 17bfd11ab6c..52d7a948fe1 100644
--- a/include/vulkan/vk_android_native_buffer.h
+++ b/include/vulkan/vk_android_native_buffer.h
@@ -20,6 +20,12 @@
 #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



More information about the mesa-commit mailing list