Skip to content

Use of VkApplicationInfo::apiVersion to limit available enums/structs in (physical) device calls #10913

@MarijnS95

Description

@MarijnS95

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 VkPhysicalDevice object as its first parameter and either:

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 and VkApplicationInfo::apiVersion are 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    IncompleteMissing Validation VUs to be addedSpecChangeIssues that require a change in the Vulkan Spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions