From 9c1f6ed80441bcd1cb4fec7a12201240e9249ea9 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 24 Oct 2020 16:04:29 +0200 Subject: [PATCH] frontends/va: Initialize drm modifier on import. On import we don't get a modifier so the modifier in the Gallium handle should be set to DRM_FORMAT_MOD_INVALID instead of LINEAR. Otherwise things like screen capture break if the driver actually starts supporting modifiers. Acked-by: Leo Liu Part-of: --- src/gallium/frontends/va/surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/frontends/va/surface.c b/src/gallium/frontends/va/surface.c index c396b158cd7..7a4fe3a3495 100644 --- a/src/gallium/frontends/va/surface.c +++ b/src/gallium/frontends/va/surface.c @@ -601,6 +601,7 @@ surface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface, memset(&whandle, 0, sizeof(struct winsys_handle)); whandle.type = WINSYS_HANDLE_TYPE_FD; whandle.handle = memory_attribute->buffers[index]; + whandle.modifier = DRM_FORMAT_MOD_INVALID; // Create a resource for each plane. memset(resources, 0, sizeof resources);