vulkan-go / vulkan

Vulkan API bindings for Go programming language
MIT License
742 stars 55 forks source link

Android support from version 8 #68

Closed tomas-mraz closed 1 year ago

tomas-mraz commented 1 year ago

Hi, I try to make working Vulkan demos on a Samsung phone with Android 8 (Oreo) and the loader does not work (something about missing "ProcAddr"). It looks like the Android Vulkan Loader is different from Khronos Loader but uses the same protocol for initializing the dispatch table as Khronos one.

I try to use the same wrapper for Android as for desktop OS and it works.

I would like to suggest changing Android support to version 8 and higher which contains the Khronos Vulkan loader maintained by Google. It means Android code can use the same wrapper as desktop OS. I successfully tested it on vulkaninfo and vulkandraw samples.

On the apps side should be fine initialization like this:

vk.SetDefaultGetInstanceProcAddr()
vk.Init()

I place this ticket as an opportunity to discuss this. It is OK or did I miss something?

Pull request is https://github.com/vulkan-go/vulkan/pull/69

Changed examples [will be in MR in a while].

xlab commented 1 year ago

Awesome! Thank you very much

xlab commented 1 year ago

The Android support was implemented as early as possible, I remember ordering Nvidia SHIELD Tablet K1 which was (I think) the first one of the consumer devices to support Vulkan...

Glad they established some standards since Oreo 8!