summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-02-15 15:54:11 +0100
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-02-17 12:51:05 +0000
commit7a47a7b4c4ea969ffa03d7aa729393c51f3016df (patch)
treec50a66ec1a74998f84537d177040008e3044a2dc /sys
parent21347e13f5aed3959a5bec4098a0492372176117 (diff)
downloadgstreamer-plugins-bad-7a47a7b4c4ea969ffa03d7aa729393c51f3016df.tar.gz
va: allocator: set workaround only for i965 driver
In commit 117453b9 a i965 driver workaround was added for all drivers, because at that time we didn't have a driver implementation API. Now there's one. This patch set the workaround only for the i965 driver. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2021>
Diffstat (limited to 'sys')
-rw-r--r--sys/va/gstvaallocator.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/va/gstvaallocator.c b/sys/va/gstvaallocator.c
index 0a2ff65c2..ab111bb01 100644
--- a/sys/va/gstvaallocator.c
+++ b/sys/va/gstvaallocator.c
@@ -644,9 +644,10 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator,
&surface, 1))
return FALSE;
- /* FIXME(victor): find a better way since this is just a hack for
- * i965 driver */
- if (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY) {
+ /* workaround for missing layered dmabuf formats in i965 */
+ if (gst_va_display_is_implementation (self->display,
+ GST_VA_IMPLEMENTATION_INTEL_I965)
+ && (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY)) {
/* These are not representable as separate planes */
export_flags = VA_EXPORT_SURFACE_COMPOSED_LAYERS;
} else {