mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
hwcontext_vulkan: always enable MUTABLE creation flag
We need it even for something as simple as bitexact opening of images.
This commit is contained in:
parent
98f6d43146
commit
76e8afa8a6
@ -2726,11 +2726,11 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
|
|||||||
!(hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR)));
|
!(hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR)));
|
||||||
int sampleable = hwctx->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
|
int sampleable = hwctx->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
|
||||||
VK_IMAGE_USAGE_STORAGE_BIT);
|
VK_IMAGE_USAGE_STORAGE_BIT);
|
||||||
|
hwctx->img_flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
|
||||||
if (sampleable && !is_lone_dpb) {
|
if (sampleable && !is_lone_dpb) {
|
||||||
hwctx->img_flags = VK_IMAGE_CREATE_ALIAS_BIT;
|
hwctx->img_flags |= VK_IMAGE_CREATE_ALIAS_BIT;
|
||||||
if ((fmt->vk_planes > 1) && (hwctx->format[0] == fmt->vkf))
|
if ((fmt->vk_planes > 1) && (hwctx->format[0] == fmt->vkf))
|
||||||
hwctx->img_flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT |
|
hwctx->img_flags |= VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
|
||||||
VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user