Unfortunately we cannot just use the newer Vulkan macros since the major version for the NVIDIA driver needs 10 bits whereas the newer Vulkan macro for the major version truncates to 7 bits.
From vulkan_core.h:
// DEPRECATED: This define is deprecated. VK_API_VERSION_MAJOR should be used instead.
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22U)
#define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x7FU)
The newer VK_API_VERSION_MAJOR cuts after 7 bits due to introduction of the variant number, this conflicts with the 10 bits needed for the NVIDIA major version.
Unfortunately we cannot just use the newer Vulkan macros since the major version for the NVIDIA driver needs 10 bits whereas the newer Vulkan macro for the major version truncates to 7 bits.
From
vulkan_core.h
:The newer
VK_API_VERSION_MAJOR
cuts after 7 bits due to introduction of thevariant
number, this conflicts with the 10 bits needed for the NVIDIA major version.Inspired by https://github.com/doitsujin/dxvk/pull/4001