mirror of https://git.ffmpeg.org/ffmpeg.git
hwcontext_vulkan: guard all uses of new spec defines and fix stray bracket
This fixes compilation with less recent Vulkan headers.
This commit is contained in:
parent
a304cbeb8d
commit
ac092c6707
|
@ -281,7 +281,10 @@ static void device_features_copy_needed(VulkanDeviceFeatures *dst, VulkanDeviceF
|
|||
|
||||
COPY_VAL(atomic_float.shaderBufferFloat32Atomics);
|
||||
COPY_VAL(atomic_float.shaderBufferFloat32AtomicAdd);
|
||||
|
||||
#ifdef VK_KHR_shader_relaxed_extended_instruction
|
||||
COPY_VAL(relaxed_extended_instruction.shaderRelaxedExtendedInstruction);
|
||||
#endif
|
||||
|
||||
COPY_VAL(optical_flow.opticalFlow);
|
||||
#undef COPY_VAL
|
||||
|
@ -774,8 +777,8 @@ static int check_extensions(AVHWDeviceContext *ctx, int dev, AVDictionary *opts,
|
|||
err = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (user_exts_str) {
|
||||
char *save, *token = av_strtok(user_exts_str, "+", &save);
|
||||
|
|
|
@ -44,7 +44,9 @@ static inline uint64_t ff_vk_extensions_to_mask(const char * const *extensions,
|
|||
{ VK_EXT_DEBUG_UTILS_EXTENSION_NAME, FF_VK_EXT_DEBUG_UTILS },
|
||||
|
||||
/* Device extensions */
|
||||
#ifdef VK_KHR_shader_relaxed_extended_instruction
|
||||
{ VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME, FF_VK_EXT_RELAXED_EXTENDED_INSTR },
|
||||
#endif
|
||||
{ VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_DMABUF_MEMORY },
|
||||
{ VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME, FF_VK_EXT_DRM_MODIFIER_FLAGS },
|
||||
{ VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_FD_MEMORY },
|
||||
|
|
Loading…
Reference in New Issue