From d21cc94201ab1e6cb54ff33a7a835248fe336777 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 14 Dec 2020 21:32:55 +0200 Subject: [PATCH] gallium/dri2: Don't forget protected content flag Signed-off-by: Lionel Landwerlin Fixes: bd182777c8f2c4 ("egl: implement EGL_EXT_protected_surface support") Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/frontends/dri/dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index e65fe169daf..5c16f91422d 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -758,6 +758,8 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target, 0, 0, PIPE_BIND_SAMPLER_VIEW)) tex_usage |= PIPE_BIND_SAMPLER_VIEW; + if (is_protected_content) + tex_usage |= PIPE_BIND_PROTECTED; /* For NV12, see if we have support for sampling r8_b8g8 */ if (!tex_usage && map->pipe_format == PIPE_FORMAT_NV12 &&