summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2020-05-15 00:21:51 +0100
committerLynne <dev@lynne.ee>2020-05-23 19:07:43 +0100
commit192997dd7f87182e7d4a5e752718e98d1824e9fe (patch)
tree6aac89ae9b4557e535871407f6510eb94e10e0c5 /libavutil
parent2c6366590e912714913680af8ea628262975755c (diff)
hwcontext_vulkan: set usage for DRM imports to the frames context usage
They're nothing special, and there's no reason they should always use the default flags.
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/hwcontext_vulkan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 9374b86632..3e70252f02 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1944,6 +1944,7 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f
AVVulkanDeviceContext *hwctx = ctx->hwctx;
VulkanDevicePriv *p = ctx->internal->priv;
VulkanFramesPriv *fp = hwfc->internal->priv;
+ AVVulkanFramesContext *frames_hwctx = hwfc->hwctx;
const AVPixFmtDescriptor *fmt_desc = av_pix_fmt_desc_get(hwfc->sw_format);
const int has_modifiers = p->extensions & EXT_DRM_MODIFIER_FLAGS;
VkSubresourceLayout plane_data[AV_NUM_DATA_POINTERS] = { 0 };
@@ -2043,7 +2044,7 @@ static int vulkan_map_from_drm_frame_desc(AVHWFramesContext *hwfc, AVVkFrame **f
.flags = VK_IMAGE_CREATE_ALIAS_BIT,
.tiling = f->tiling,
.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED, /* specs say so */
- .usage = DEFAULT_USAGE_FLAGS,
+ .usage = frames_hwctx->usage,
.samples = VK_SAMPLE_COUNT_1_BIT,
.pQueueFamilyIndices = p->qfs,
.queueFamilyIndexCount = p->num_qfs,