NV12, YUV, YUYV and UYVY handling checks !tex_usage so set
PIPE_BIND_PROTECTED after.
This fixes encrypted nv12 textures handling.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107>
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 &&
if (!tex_usage)
return NULL;
+ if (is_protected_content)
+ tex_usage |= PIPE_BIND_PROTECTED;
+
img = CALLOC_STRUCT(__DRIimageRec);
if (!img)
return NULL;