-
Notifications
You must be signed in to change notification settings - Fork 455
Description
Describe the situation in which you encountered the missing validation
I'm not exactly confident from reading https://docs.vulkan.org/spec/latest/chapters/initialization.html#VkApplicationInfo that apiVersion here describes/limits the "API" that we can use. From reading https://docs.vulkan.org/spec/latest/chapters/fundamentals.html#fundamentals-validusage-enums it doesn't seem to constrain what I can pass to vkCreateDevice() for example:
- If the enumerant is used in a function that has a
VkPhysicalDeviceobject as its first parameter and either:
- it was added by a core version that is supported by that device (as reported by
VkPhysicalDeviceProperties::apiVersion);
But if we move on to https://docs.vulkan.org/spec/latest/chapters/initialization.html#_extending_physical_device_core_functionality, it says:
New core physical-device-level functionality can be used when both
VkPhysicalDeviceProperties::apiVersion andVkApplicationInfo::apiVersionare greater than or equal to the version of Vulkan that added the new functionality.
Emphasis mine. If that's true, validation is probably expected here?
In my example I find a Vulkan 1.4 physical device while only setting VkApplicationInfo::apiVersion to 1.2, and expected a validation layer error for using/passing structures to vkCreateDevice() that are only defined in 1.3 onwards, such as passing VkPhysicalDeviceVulkan13Features (my application shouldn't be allowed to assume that anything from a core version >1.2 even exists?).
Valid Usage IDs requested
Please include the valid usage IDs for the checks you are requesting:
?
Additional Context
Perhaps this is alson an upstream Vulkan-Docs issue, as the last quote should probably make its way into the earlier two if this is true.
Prior art
- Unclear corner cases about newer versions Vulkan-Docs#1097 point 4.
- When is it valid to use core version physical-device-level functionality? Vulkan-Docs#1539
- Not always clear if instance or device version is meant Vulkan-Docs#1569
- Enumerant validity rules seem incorrect Vulkan-Docs#2077 point 6. (there is a reply that says "yea I missed that this is bounded by the api version - will fix." but not sure it materialized)
- Physical-Device-Level function valid usage for Newer Core Versions Vulkan-Docs#2384