diff options
author | Lynne <dev@lynne.ee> | 2022-11-23 20:32:49 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2023-05-29 00:41:37 +0200 |
commit | e0f2d2e70228d022195afccc057bd6dc8b688c21 (patch) | |
tree | d43f6f45178bd25fd99317dfc4d4b79b05b03247 /libavutil/hwcontext_vulkan.c | |
parent | 46a77c6496a54d0079e6a2108a0dfffead861ac8 (diff) | |
download | ffmpeg-e0f2d2e70228d022195afccc057bd6dc8b688c21.tar.gz |
hwcontext_vulkan: remove contiguous memory path/mode
The hack was added to enable exporting of vulkan images to DRM.
On Intel hardware, specifically for DRM images, all planes must be
allocated next to each other, due to hardware limitation, so the hack
used a single large allocation and suballocated all planes from it.
By natively supporting multiplane images, the driver is what decides
the layout, so exporting just works.
It's a hack because it conflicted heavily with image allocation, and
with the whole ecosystem in general, before multiplane images were
supported, which just made it redundant.
This is also the commit which broke the hwcontext hardest and prompted
the entire rewrite in the first place.
Diffstat (limited to 'libavutil/hwcontext_vulkan.c')
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index b511836b7b..9eb872ca78 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -112,9 +112,6 @@ typedef struct VulkanDevicePriv { /* Nvidia */ int dev_is_nvidia; - - /* Intel */ - int dev_is_intel; } VulkanDevicePriv; typedef struct VulkanFramesPriv { @@ -1504,7 +1501,6 @@ static int vulkan_device_init(AVHWDeviceContext *ctx) p->hprops.minImportedHostPointerAlignment); p->dev_is_nvidia = (p->props.properties.vendorID == 0x10de); - p->dev_is_intel = (p->props.properties.vendorID == 0x8086); vk->GetPhysicalDeviceQueueFamilyProperties(hwctx->phys_dev, &qf_num, NULL); if (!qf_num) { @@ -1629,8 +1625,6 @@ static int vulkan_device_derive(AVHWDeviceContext *ctx, return AVERROR_EXTERNAL; } - if (strstr(vendor, "Intel")) - dev_select.vendor_id = 0x8086; if (strstr(vendor, "AMD")) dev_select.vendor_id = 0x1002; @@ -2366,12 +2360,6 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc) if (!hwctx->usage) hwctx->usage = FF_VK_DEFAULT_USAGE_FLAGS; - if (!(hwctx->flags & AV_VK_FRAME_FLAG_NONE)) { - if (p->contiguous_planes == 1 || - ((p->contiguous_planes == -1) && p->dev_is_intel)) - hwctx->flags |= AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY; - } - modifier_info = vk_find_struct(hwctx->create_pnext, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT); |