mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 00:40:09 +01:00
khronos-update: Update ANDROID guards in vk_android_native_buffer.h
This file was modified in commit bcc1950886 ("vulkan: fix glibc AOSP build")
without realizing it is imported code.
Update it to prevent the need to revert this modification after every
header update.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33272>
This commit is contained in:
parent
5b04337ba0
commit
a5765d7659
1 changed files with 20 additions and 2 deletions
|
|
@ -52,8 +52,26 @@ class Source:
|
|||
|
||||
|
||||
VK_ANDROID_NATIVE_BUFFER_TEMPLATE = """\
|
||||
/* MESA: A hack to avoid #ifdefs in driver code. */
|
||||
#ifdef __ANDROID__
|
||||
/*
|
||||
* MESA: buffer_handle_t is defined by all Mesa builds, even if
|
||||
* one is building for a non-Android target. This avoids unnecessary
|
||||
* conditionals in driver code.
|
||||
*
|
||||
* We don't need to define buffer_handle_t locally when (__ANDROID__)
|
||||
* or ANDROID are set. Here's the distinction between the two:
|
||||
*
|
||||
* - AOSP always defines ANDROID, since it just means one is using the
|
||||
* AOSP tree. It means the build environment is Android, roughly.
|
||||
* - __ANDROID__ is defined by the toolchain. This typically means the
|
||||
* build target is Android.
|
||||
*
|
||||
* If the build environment is Android, AOSP can provide common Android
|
||||
* headers, such as <cutils/native_handle.h>. This allows one to build
|
||||
* and test certain aspects of Android window system code, on the host
|
||||
* system rather the build target.
|
||||
*/
|
||||
|
||||
#if defined(__ANDROID__) || defined(ANDROID)
|
||||
|
||||
#include <cutils/native_handle.h>
|
||||
#if ANDROID_API_LEVEL < 28
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue