mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
xrt: Add a macro for Android platform to select vulkan memory to create swapchain.
Increases compatibility. AHardwareBuffer path left available and enabled by default.
This commit is contained in:
parent
cc54210f47
commit
d232e73587
|
@ -18,6 +18,7 @@
|
|||
|
||||
#if defined(__ANDROID__)
|
||||
#define XRT_OS_ANDROID
|
||||
#define XRT_OS_ANDROID_USE_AHB
|
||||
#define XRT_OS_LINUX
|
||||
#define XRT_OS_UNIX
|
||||
#define XRT_OS_WAS_AUTODETECTED
|
||||
|
|
|
@ -187,7 +187,7 @@ xrt_shmem_is_valid(xrt_shmem_handle_t handle)
|
|||
*
|
||||
*/
|
||||
|
||||
#if defined(XRT_OS_ANDROID) && (__ANDROID_API__ >= 26)
|
||||
#if defined(XRT_OS_ANDROID) && defined(XRT_OS_ANDROID_USE_AHB) && (__ANDROID_API__ >= 26)
|
||||
typedef struct AHardwareBuffer AHardwareBuffer;
|
||||
|
||||
/*!
|
||||
|
@ -235,7 +235,7 @@ xrt_graphics_buffer_is_valid(xrt_graphics_buffer_handle_t handle)
|
|||
*/
|
||||
#define XRT_GRAPHICS_BUFFER_HANDLE_INVALID NULL
|
||||
|
||||
#elif defined(XRT_OS_LINUX)
|
||||
#elif defined(XRT_OS_ANDROID) && !defined(XRT_OS_ANDROID_USE_AHB) || defined(XRT_OS_LINUX)
|
||||
|
||||
/*!
|
||||
* The type underlying buffers shared between compositor clients and the main
|
||||
|
|
Loading…
Reference in a new issue