我在使用 VK_MAKE_VERSION
时才意识到它已被弃用。弃用消息建议使用 VK_MAKE_API_VERSION
反而。它们之间唯一的区别是后者有一个额外的 variant
参数。
我知道主要
、次要
和补丁
的含义,但我从未见过变体
版本前。这是什么意思?
最佳答案
这在 30.2.1. Version Numbers 节中有解释。的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.
block 引用>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.
关于version - VK_MAKE_API_VERSION 中的 Vulkan API 版本变体是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68695260/