Skip to content

Commit

Permalink
configure: improve non-pkgconfig Vulkan version check
Browse files Browse the repository at this point in the history
Check for the patch version as well as the major+minor version.

The VK_API_VERSION macros are not usable in preprocessor code due
to casts.
The patch (header) version is meant to linearly increment and
not be reset, however it's better to trust, but verify.
  • Loading branch information
cyanreg committed Dec 21, 2021
1 parent fa2e460 commit 14b6805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -6915,7 +6915,7 @@ enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if.

if enabled vulkan; then
check_pkg_config_header_only vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" ||
check_cpp_condition vulkan "vulkan/vulkan.h" "defined VK_VERSION_1_2"
check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_3) || (defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 189)"
fi

if enabled x86; then
Expand Down

0 comments on commit 14b6805

Please sign in to comment.