khronos-update: Add ANDROID guards to vk_android_native_buffer.h

Avoids adding back the code after every header update.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29621>
This commit is contained in:
Konstantin Seurer
2024-06-07 22:04:11 +02:00
committed by Marge Bot
parent 3f9fe2dbe1
commit 5726ecae3e
2 changed files with 48 additions and 15 deletions

View File

@@ -1,3 +1,18 @@
/* MESA: A hack to avoid #ifdefs in driver code. */
#ifdef __ANDROID__
#include <cutils/native_handle.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
/*
* Copyright 2015 The Android Open Source Project
*
@@ -17,20 +32,8 @@
#ifndef __VK_ANDROID_NATIVE_BUFFER_H__
#define __VK_ANDROID_NATIVE_BUFFER_H__
/* MESA: A hack to avoid #ifdefs in driver code. */
#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
#ifdef __cplusplus
extern "C" {
#endif