Ad

Sharing GPU Memory In Android

- 1 answer

Is it possible to share GPU memory in Android (generic/textures/vertex buffers, etc) between processes?

The API to share CPU RAM was exposed in 8.1: https://developer.android.com/reference/android/os/SharedMemory

Ad

Answer

HardwareBuffer objects can be passed between processes, and can be imported to/from Vulkan using the VK_ANDROID_external_memory_android_hardware_buffer extension. You can use the functions in android/hardware_buffer_jni.h to move between Java/Kotlin (HardwareBuffer) and C++ (AHardwareBuffer) objects.

Ad
source: stackoverflow.com
Ad