1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

vulkan: maintain compatibility with older headers

This commit is contained in:
Lynne
2025-06-12 00:17:01 +09:00
parent 3ac7d70291
commit 922a1ca989
2 changed files with 3 additions and 3 deletions

View File

@ -2836,7 +2836,7 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
VK_IMAGE_USAGE_SAMPLED_BIT); VK_IMAGE_USAGE_SAMPLED_BIT);
if (p->vkctx.extensions & FF_VK_EXT_HOST_IMAGE_COPY) if (p->vkctx.extensions & FF_VK_EXT_HOST_IMAGE_COPY)
hwctx->usage |= supported_usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT; hwctx->usage |= supported_usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT;
/* Enables encoding of images, if supported by format and extensions */ /* Enables encoding of images, if supported by format and extensions */
if ((supported_usage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR) && if ((supported_usage & VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR) &&
@ -4311,7 +4311,7 @@ static int vulkan_transfer_frame(AVHWFramesContext *hwfc,
if (swf->width > hwfc->width || swf->height > hwfc->height) if (swf->width > hwfc->width || swf->height > hwfc->height)
return AVERROR(EINVAL); return AVERROR(EINVAL);
if (hwctx->usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT) if (hwctx->usage & VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT)
return vulkan_transfer_host(hwfc, hwf, swf, upload); return vulkan_transfer_host(hwfc, hwf, swf, upload);
for (int i = 0; i < av_pix_fmt_count_planes(swf->format); i++) { for (int i = 0; i < av_pix_fmt_count_planes(swf->format); i++) {

View File

@ -108,7 +108,7 @@ const char *ff_vk_ret2str(VkResult res)
MAP_TO(VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR, \ MAP_TO(VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR, \
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR); \ VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR); \
MAP_TO(VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT, \ MAP_TO(VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT, \
VK_IMAGE_USAGE_HOST_TRANSFER_BIT); \ VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT); \
return dst; \ return dst; \
} }