5

I want to play around with mobile Vulkan without having to buy a device.

If it is not supported, please provide evidence (e.g. source code, official Google statements). Are there any plans to support it?

If supported, please give detailed and tested instructions of how to get a minimal hello world triangle app running, including the app you have tested with.

I have tried https://github.com/googlesamples/android-vulkan-tutorials/tree/7ba478ac2e0d9006c9e2e261446003a4449b8aa3/tutorial05_triangle with a Pixel API 25 image (API 25 is supposed to support Vulkan), but keep getting build or runtime errors.

I have opened an issue at: https://github.com/googlesamples/android-vulkan-tutorials/issues/13 but it was closed without solution.

Related:

Community
  • 1
  • 1
Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985

3 Answers3

5

I suspect this Android Vulkan setup document is as definitive an answer as you're going to find from Google:

Before beginning, make sure you have the right hardware and platform version prepared. You should use a device that supports Vulkan, running Android API level 24 or higher.

Note that it does not suggest an emulator as an alternative approach - it talks only about correct hardware and device.

The good news if you have a cross-platform codebase, is that getting Vulkan running correctly on PC will get you about 99% of the way to having Vulkan running on Android. That is, assuming you're going with a Vulkan-only NativeActivity, it gets a bit more fiddly if you want a mixed Java/Native app with Vulkan support and OpenGLES fallback, in that case, there's a chunk of Android-specific work to do, but you're still over 90% there focusing on PC.

Columbo
  • 6,648
  • 4
  • 19
  • 30
  • Thanks for the link, but this is not very conclusive to me since an emulator can also count as a device. I understand Vulkan is basically the same on desktop, the reason I want this now is because my laptop is old and its GPU does not support Vulkan. Of course, any serious development will require the targeted device in the end. – Ciro Santilli OurBigBook.com Mar 04 '17 at 08:27
1

@Ciro, the emulator is a device, sure. But not necessarily a Vulkan capable. Also, if your underlaying platform doesn't support Vulkan, possible your emulator will not provide it also. AFAIK, there is no software emulation for Vulkan yet. I say that based on what happens on OpenGL ES. The Android emulator uses your video card capabilities to provide 3D hardware acceleration. Otherwise, it falls back in terrible slow software emulation. See OpenGL ES emulation:

Graphics acceleration for the emulator takes advantage of the graphics hardware on your development computer, specifically the graphics processing unit (GPU), to make screen rendering faster. Android devices use OpenGL for Embedded Systems (OpenGL ES or GLES) for rendering both 2D and 3D graphics on the screen.

(more...)

I use a Nexus 5X with Android 7 (Beta Program), to my Vulkan experiments.

Alex Byrth
  • 1,328
  • 18
  • 23
1

Looks like as of Android Emulator 29.0.6 there is Vulkan support via the emulator now.

Windows and Linux users can now test Vulkan apps with the Android Emulator up to Vulkan 1.1 when using a compatible system image (Android Q Beta 3 or higher for Vulkan 1.1, Android Q Beta 2 for Vulkan 1.0) and a compatible host GPU (this includes most Intel, NVIDIA, and AMD GPUs from 2014 and later).

Furthermore looking at the release notes they are still actively developing and improving it. So perhaps the latest version 32.1.14 (as of time or writing) may be in a suitable enough state for development/CI.

jpr42
  • 718
  • 3
  • 14