KhronosGroup/OpenXR-Tutorials

Android Vulkan header VK_MAKE_API_VERSION not defined

Closed this issue · 2 comments

For Android, we currently using this version of the Android NDK.

ndkVersion '23.1.7779620'

Unfortunately, VK_MAKE_API_VERSION is not defined in this version of the Vulkan headers. As a workaround, I have defined VK_MAKE_API_VERSION to wrap over VK_MAKE_VERSION.

#if defined(__ANDROID__) && !defined(VK_API_MAKE_VERSION)
#define VK_MAKE_API_VERSION(variant, major, minor, patch) VK_MAKE_VERSION(major, minor, patch)
#endif

Is this workaround suitable or bad practice?
I haven't checked, but do later versions of the NDK have newer Vulkan headers that have the VK_MAKE_API_VERSION macro?
If so, do we want to upgrade our NDK version for the tutorial?

LGTM

Ok, closing issue.