-
Notifications
You must be signed in to change notification settings - Fork 28
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
Undeclared Identifiers & duplicate case values #178
Comments
Which version of Vulkan-Headers are you using? It looks to me like your version is older than 1.3.275, which is the current version that Vulkan-Utility-Libraries are using. The enums in your error messages are only found in the latest Vulkan-Headers. |
I believe its 1.3.268, whatever was installed with the SDK. Do I have use the headers from the Vulkan-Headers repo in order to get the Vulkan-Utility-Libraries to work? |
I see that a new SDK was released same day as my question, I've updated, but it doesn't help with my Android builds which are utilizing the headers inside the NDK which are still at 1.3.237 on the latest release. Should I be redirecting my builds to use different headers? |
I think you will have to use the headers that come with the SDK, the only alternative I see is that you build the repository yourself with the header version you want. The tags on this repository only go down to |
That's too bad, I was primarily wanting to use |
The filed are auto-generated, but I don't know what you mean with the |
I just mean, putting #ifdef VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR
case VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR: {
struct VKU_FORMAT_INFO out = {VKU_FORMAT_COMPATIBILITY_CLASS_16BIT, 2, 1, {1, 1, 1}, 4, {{VKU_FORMAT_COMPONENT_TYPE_A, 1}, {VKU_FORMAT_COMPONENT_TYPE_B, 5}, {VKU_FORMAT_COMPONENT_TYPE_G, 5}, {VKU_FORMAT_COMPONENT_TYPE_R, 5}}};
return out; }
#endif Having to generate these headers to each version of an SDK is going to severely limit ability to distribute them. |
If you are getting Vulkan-Utility-Libraries from github, then you should also be getting the Vulkan-Headers from github. That way you'll have the latest version and all of these versioning issues go away.
This library requires a specific header version (or higher) to function, which is located in the scripts/known_good.json Vulkan-Headers object. While it is possible to add ifdefs to every declaration, I can tell you that its not as simple as that, as there are a number of situations that make the logic complex, or when the API was changed (typically, a major mistake in a new extension gets fixed before people start using it). |
This goes back to my earlier question, is this still true for Android development? |
Yes, that is my understanding. The headers are just header code and should be backwards compatible (and generally are for applications, its libraries trying to allow using of multiple header versions that get broken). |
Got it, thanks, I'll have to give a try then. |
For more context, this is the code-gen file I use to generate a dispatch table for vk-bootstrap. https://github.com/charles-lunarg/vk-bootstrap/blob/0af4cb5055a4a3a841d5dd42afa20f294c87ea7c/script/generate_dispatch.py#L106 Since the API added functions to extensions after the extension was released (like, extension version 1 added a new function) I couldn't just use ifdef to guard the function, but had to special case them as I found them. The other case was that a function changed its parameters in a subsequent header update (which is valid, the old parameters were a mistake). Just causes pain for me where there isn't an easy way to detect such a case in vk.xml. On top of that, there is extensive logic to figure out the exact combinations of ifdef's to use, as some things came come from a vulkan version or an extension (and sometimes both???) which gets very confusing. |
Is the intention that people use Vulkan-Utility-Libraries instead of the files included with SDKs? My main motivation was to avoid the platform #ifdef that was required because vk_enum_string_helper.h was missing from the Android ndk. |
The answer to this question depends on how you are grabbing dependencies. The SDK includes some of the headers in this repo, although not all of them from the looks of it. It is a new repo, only being created around |
I'm getting a lot of undeclared identifier errors and duplicate case value errors when I try to use the headers (vk_enum_string_helper.h and utility/vk_format_utils.h) from Vulkan Utilities as opposed the system installed headers. Have I done something wrong here, or is there something else I need to include and/or configure? In this case I am compiling for Android.
vk_enum_string_helper.h
vk_format_utils.h
The text was updated successfully, but these errors were encountered: