turnip: add tu_android.h

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17811>
This commit is contained in:
Chia-I Wu 2022-07-29 17:59:08 -07:00 committed by Marge Bot
parent 8e61bee30c
commit e99703b515
3 changed files with 29 additions and 12 deletions

View file

@ -21,6 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "tu_android.h"
#include "tu_private.h"
#include <hardware/gralloc.h>

View file

@ -0,0 +1,27 @@
/*
* Copyright © 2016 Red Hat.
* Copyright © 2016 Bas Nieuwenhuizen
* SPDX-License-Identifier: MIT
*
* based in part on anv driver which is:
* Copyright © 2015 Intel Corporation
*/
#ifndef TU_ANDROID_H
#define TU_ANDROID_H
#include "tu_common.h"
VkResult
tu_gralloc_info(struct tu_device *device,
const VkNativeBufferANDROID *gralloc_info,
int *dma_buf,
uint64_t *modifier);
VkResult
tu_import_memory_from_gralloc_handle(VkDevice device_h,
int dma_buf,
const VkAllocationCallbacks *alloc,
VkImage image_h);
#endif /* TU_ANDROID_H */

View file

@ -29,6 +29,7 @@
#define TU_PRIVATE_H
#include "tu_common.h"
#include "tu_android.h"
#include "tu_autotune.h"
#include "tu_clear_blit.h"
#include "tu_cmd_buffer.h"
@ -97,16 +98,4 @@ tu_framebuffer_tiling_config(struct tu_framebuffer *fb,
const struct tu_device *device,
const struct tu_render_pass *pass);
VkResult
tu_gralloc_info(struct tu_device *device,
const VkNativeBufferANDROID *gralloc_info,
int *dma_buf,
uint64_t *modifier);
VkResult
tu_import_memory_from_gralloc_handle(VkDevice device_h,
int dma_buf,
const VkAllocationCallbacks *alloc,
VkImage image_h);
#endif /* TU_PRIVATE_H */