1

The playback of video on world geometry aka "movie texture" is an important feature for many games. On Android, this can be done HW-accelerated by using the

GL_TEXTURE_EXTERNAL_OES

extension for OpenGL ES.

But I cannot find any similar extension or feature for vulkan.

Has someone already found a solution how to play back video with vulkan, that doesn't involve copying the texture data for each frame between CPU and GPU ram, and therefore is efficient enough for Android Devices ?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Constantin Geier
  • 303
  • 4
  • 13
  • The external memory extensions for Vulkan already landed few months back. Give it some time. It is considered experimental still, drivers need to implement this and 3rd party software (like Android) needs to expose and make use of the feature. – krOoze May 06 '17 at 21:28
  • I.e. `VK_KHX_external_memory` and friends are probably the extensions equivalent you are looking for. – krOoze May 06 '17 at 21:38
  • 1
    Yup. Though as Nicol Bolas mentioned in his answer, the external_memory extensions are not the whole answer: you also need a way to deal with YCbCr formats and device-specific formats in a portable way. GL_TEXTURE_EXTERNAL_OES is a giant black box of driver magic (often involving hidden shader recompiles); achieving the same thing in Vulkan is not going to be quite as simple. – Jesse Hall May 07 '17 at 02:45

1 Answers1

1

The Vulkan equivalents are the KHX_external_memory line of extensions. The "KHX" moniker means that they're experimental, so they're probably not widely implemented.

However, the current extensions that actually provide sources for external memory are Win32 (via Windows HANDLEs) and fd (via POSIX file descriptors). This is quite different from the behavior of OES_EGL_image_external, which is about accessing EGL images which can even have formats OpenGL doesn't normally deal with (YUV). The Vulkan external memory tool requires that the the format be an actual Vulkan format.

So at the moment, Vulkan cannot effectively handle what you're talking about.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982