From 7cbcf92c3bb2aaef88b33716af951b03b217a266 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 4 Jul 2024 15:48:24 -0400 Subject: [PATCH] aux/ogl: always return false in ogl_import_from_native for AHardwareBuffer Part-of: --- src/xrt/auxiliary/ogl/ogl_helpers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xrt/auxiliary/ogl/ogl_helpers.c b/src/xrt/auxiliary/ogl/ogl_helpers.c index 23be37850..d4d7f6969 100644 --- a/src/xrt/auxiliary/ogl/ogl_helpers.c +++ b/src/xrt/auxiliary/ogl/ogl_helpers.c @@ -98,6 +98,12 @@ ogl_import_from_native(struct xrt_image_native *natives, const struct xrt_swapchain_create_info *info, struct ogl_import_results *results) { +#if defined(XRT_OS_ANDROID_USE_AHB) + // Function is disabled for AHardwareBuffer, glImportMemoryFdEXT requires an actual FD and requires more work + // to handle AHardwareBuffer. + return false; +#endif + // Setup fields. results->width = info->width; results->height = info->height;