Arcore-android-sdk: Feature Request: Support for Vulkan (VK_KHR_external_memory)

Created on 23 Mar 2018  路  7Comments  路  Source: google-ar/arcore-android-sdk

Are there any plans to support VK_KHR_external_memory or something similar with ArSession_setCameraTextureName? It would be great to use Vulkan as a render backend but as far as I understood you only can either use GLES or Vulkan for the same surface you render to.

feature request known issue

Most helpful comment

I'm not on the AR team, but can answer the question. Internally, SurfaceTexture is a mutable texture: the same texture ID is used in multiple calls to glEGLImageTargetTexture2DOES to point the texture at different native buffers (gralloc buffers). Mutable textures do not exist in Vulkan and therefore it's not possible to add Vulkan support to SurfaceTexture. The Vulkan-compatible equivalent of SurfaceTexture is AImageReader, but using it with camera frames requires Vulkan 1.1 and the extension VK_ANDROID_external_memory_android_hardware_buffer, which is not supported by any GPU drivers yet.

All 7 comments

While VK_KHR_external_memory solves half the problem, at the moment Android has no equivalent to SurfaceTexture that works with Vulkan.

Are there any plans for supporting a Vulkan enabled SurfaceTexture in a future Android release?

I'm not on the AR team, but can answer the question. Internally, SurfaceTexture is a mutable texture: the same texture ID is used in multiple calls to glEGLImageTargetTexture2DOES to point the texture at different native buffers (gralloc buffers). Mutable textures do not exist in Vulkan and therefore it's not possible to add Vulkan support to SurfaceTexture. The Vulkan-compatible equivalent of SurfaceTexture is AImageReader, but using it with camera frames requires Vulkan 1.1 and the extension VK_ANDROID_external_memory_android_hardware_buffer, which is not supported by any GPU drivers yet.

@tweenk Thanks for the info!

I want to use ARCore with Vulkan, too. Any updates?

Any updates on this?

No updates on this so far, sorry.

Was this page helpful?
0 / 5 - 0 ratings