Opened 8 months ago

Closed 7 months ago

#10596 closed defect (fixed)

configure: vulkan detection not enforcing minimum version

Reported by: Tristan Matthews Owned by:
Priority: normal Component: build system
Version: git-master Keywords: vulkan
Cc: Tristan Matthews Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

On my system, I currently have:

pkg-config --modversion vulkan
1.3.239

which doesn't meet the minimum requirements in configure of 1.3.255 (i.e. my header version is 239):

if enabled vulkan; then
    check_pkg_config_header_only vulkan "vulkan >= 1.3.255" "vulkan/vulkan.h" "defined VK_VERSION_1_3" ||
        check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 255)"

Unsuprisingly, the build fails on:

In file included from ./libavutil/vulkan.h:30,
                 from libavfilter/vulkan_spirv.h:22,
                 from libavfilter/vulkan_glslang.c:24:
./libavutil/vulkan_functions.h:223:5: error: unknown type name ‘PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR’
  223 |     PFN_vk##name name;
      |     ^~~~~~
./libavutil/vulkan_functions.h:84:5: note: in expansion of macro ‘PFN_DEF’
   84 |     MACRO(1, 0, FF_VK_EXT_COOP_MATRIX,          GetPhysicalDeviceCooperativeMatrixPropertiesKHR) \
      |     ^~~~~
./libavutil/vulkan_functions.h:227:5: note: in expansion of macro ‘FN_LIST’
  227 |     FN_LIST(PFN_DEF)
      |     ^~~~~~~
In file included from ./libavutil/vulkan.h:32:
./libavutil/vulkan_loader.h: In function ‘ff_vk_extensions_to_mask’:
./libavutil/vulkan_loader.h:49:11: error: ‘VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME’ undeclared (first use in this function); did you mean ‘VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME’?
   49 |         { VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME,        FF_VK_EXT_COOP_MATRIX            },
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |           VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME
./libavutil/vulkan_loader.h:49:11: note: each undeclared identifier is reported only once for each function it appears in
./libavutil/vulkan.h: At top level:
./libavutil/vulkan.h:239:5: error: unknown type name ‘VkPhysicalDeviceCooperativeMatrixPropertiesKHR’
  239 |     VkPhysicalDeviceCooperativeMatrixPropertiesKHR coop_matrix_props;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./libavutil/vulkan.h:245:5: error: unknown type name ‘VkCooperativeMatrixPropertiesKHR’
  245 |     VkCooperativeMatrixPropertiesKHR *coop_mat_props;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [ffbuild/common.mak:81: libavfilter/vulkan_glslang.o] Error 1

but this shouldn't have been attempted in the first place.

Moreover, passing --disable-vulkan doesn't avoid this issue either as it will still try to build the vulkan hwaccels + filters etc.

Change History (1)

Note: See TracTickets for help on using tickets.