Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] wrong signatures for terminator_CreateAndroidSurfaceKHR() and vkCreateAndroidSurfaceKHR() #96

Closed
elix22 opened this issue Nov 5, 2018 · 2 comments
Milestone

Comments

@elix22
Copy link

elix22 commented Nov 5, 2018

Hi
There is a mismatch in the function signatures causing compilation failure while compiling for Android ,at least for me :).

The type definition of the API can be found in the link below.
https://github.com/KhronosGroup/Vulkan-Headers/blob/master/include/vulkan/vulkan_android.h

typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);

The wrong signatures of the API's can found in the link below .
https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/wsi.c

LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(VkInstance instance, ANativeWindow *window,const VkAllocationCallbacks *pAllocator,VkSurfaceKHR *pSurface)

VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateAndroidSurfaceKHR(VkInstance instance, Window window,const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface)

I guess the body of terminator_CreateAndroidSurfaceKHR() should be modified to comply with the right signature.
In addition terminator_CreateAndroidSurfaceKHR() should be declared in wsi.h

@lenny-lunarg
Copy link
Contributor

This loader does not compile for Android and is not intended to compile for Android. Android systems have a separate loader, maintained by Google, which they package with Android distributions. I'm not sure exactly where you would find that loader, but I would recommend looking through the Android Vulkan documentation. I'm closing this issue because Android is unsupported by this repo.

@elix22
Copy link
Author

elix22 commented Nov 6, 2018

I tried to compile it as part of the Angle project , and it failed for Android.
I am using my own cmake files to compile Angle with the Vulkan backend.
Android is not my main objective in this specific project , just reported what I saw.
Other platforms were compiled smoothly.
Thanks for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants