turnip/android: Use DETECT_OS_ANDROID in tu_device
ANDROID definition is not available in some cases.
Fixes: 99753001f3
("turnip: Support AHardwareBuffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11242
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29478>
This commit is contained in:

committed by
Marge Bot

parent
c1373239f2
commit
6fee2715ce
@@ -2818,7 +2818,7 @@ tu_AllocateMemory(VkDevice _device,
|
||||
close(fd_info->fd);
|
||||
}
|
||||
} else if (mem->vk.ahardware_buffer) {
|
||||
#ifdef ANDROID
|
||||
#if DETECT_OS_ANDROID
|
||||
const native_handle_t *handle = AHardwareBuffer_getNativeHandle(mem->vk.ahardware_buffer);
|
||||
assert(handle->numFds > 0);
|
||||
size_t size = lseek(handle->data[0], 0, SEEK_END);
|
||||
|
Reference in New Issue
Block a user