gallium/dri2: Don't forget protected content flag
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 14 Dec 2020 19:32:55 +0000 (21:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 15 Dec 2020 10:10:17 +0000 (10:10 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bd182777c8f2c4 ("egl: implement EGL_EXT_protected_surface support")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8094>

src/gallium/frontends/dri/dri2.c

index e65fe169dafd17edd090d50d768f08885a76809c..5c16f91422dd660d576ff5de5ae04b88d0a688ad 100644 (file)
@@ -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 &&