VK_MAKE_API_VERSION 中的 Vulkan API 版本变体是什么?

What is the Vulkan API version variant in VK_MAKE_API_VERSION?

我是在使用 VK_MAKE_VERSION that it has been deprecated. The deprecation message recommends using VK_MAKE_API_VERSION 时才意识到的。它们之间唯一的区别是后者多了一个variant参数。

我知道majorminorpatch是什么意思,但我以前从未见过variant版本。这是什么意思?

30.2.1. Version Numbers of the current Vulkan specification 部分对此进行了解释:

The Vulkan version number comprises four parts indicating the variant, major, minor and patch version of the Vulkan API Specification.

The variant indicates the variant of the Vulkan API supported by the implementation. This is always 0 for the Vulkan API.

Note

A non-zero variant indicates the API is a variant of the Vulkan API and applications will typically need to be modified to run against it. The variant field was a later addition to the version number, added in version 1.2.175 of the Specification. As Vulkan uses variant 0, this change is fully backwards compatible with the previous version number format for Vulkan implementations. New version number macros have been added for this change and the old macros deprecated. For existing applications using the older format and macros, an implementation with non-zero variant will decode as a very high Vulkan version. The high version number should be detectable by applications performing suitable version checking.