mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
vulkan: Add #ifdef hack to vk_android_native_buffer.h
This patch consolidates many potential `#ifdef ANDROID` messes throughout src/vulkan and src/intel/vulkan into a simple, localized hack. The hack is an `#ifdef ANDROID` in vk_android_native_buffer.h that, on non-Android platorms, avoids including the Android platform headers and typedefs any Android-specific types to void*. This hack doesn't remove *all* the `#ifdef ANDROID`s in upcoming patches, but it does remove a lot. I first tried implementing VK_ANDROID_native_buffer without this hack, but eventually gave up when the yak shaving became too much. Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
5872ccc9ac
commit
f07ac34e6f
1 changed files with 5 additions and 0 deletions
|
|
@ -17,8 +17,13 @@
|
|||
#ifndef __VK_ANDROID_NATIVE_BUFFER_H__
|
||||
#define __VK_ANDROID_NATIVE_BUFFER_H__
|
||||
|
||||
/* MESA: A hack to avoid #ifdefs in driver code. */
|
||||
#ifdef ANDROID
|
||||
#include <system/window.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
#else
|
||||
typedef void *buffer_handle_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue