mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
radeonsi: honor PIPE_BIND_PROTECTED
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5096>
This commit is contained in:
parent
a653504549
commit
9698a222a6
2 changed files with 6 additions and 3 deletions
|
|
@ -166,9 +166,10 @@ void si_init_resource_fields(struct si_screen *sscreen, struct si_resource *res,
|
|||
else
|
||||
res->flags |= RADEON_FLAG_NO_INTERPROCESS_SHARING;
|
||||
|
||||
/* Force scanout/depth/stencil buffer allocation to be encrypted */
|
||||
if (sscreen->debug_flags & DBG(TMZ) &&
|
||||
res->b.b.bind & (PIPE_BIND_SCANOUT | PIPE_BIND_DEPTH_STENCIL))
|
||||
if (res->b.b.bind & PIPE_BIND_PROTECTED ||
|
||||
/* Force scanout/depth/stencil buffer allocation to be encrypted */
|
||||
(sscreen->debug_flags & DBG(TMZ) &&
|
||||
res->b.b.bind & (PIPE_BIND_SCANOUT | PIPE_BIND_DEPTH_STENCIL)))
|
||||
res->flags |= RADEON_FLAG_ENCRYPTED;
|
||||
|
||||
if (res->b.b.flags & PIPE_RESOURCE_FLAG_ENCRYPTED)
|
||||
|
|
|
|||
|
|
@ -1437,6 +1437,8 @@ static struct pipe_resource *si_texture_from_winsys_buffer(struct si_screen *ssc
|
|||
tex->buffer.b.is_shared = true;
|
||||
tex->buffer.external_usage = usage;
|
||||
tex->num_planes = 1;
|
||||
if (tex->buffer.flags & RADEON_FLAG_ENCRYPTED)
|
||||
tex->buffer.b.b.bind |= PIPE_BIND_PROTECTED;
|
||||
|
||||
/* Account for multiple planes with lowered yuv import. */
|
||||
struct pipe_resource *next_plane = tex->buffer.b.b.next;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue