From de088daccc2b5d0c7dca1d09d827f225ba8e4d53 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 23 Jul 2020 16:46:40 +0200 Subject: [PATCH] radeonsi/tmz: fail si_texture_transfer_map if tex is encrypted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index b7f85906db0..68d8e2c1f4e 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1634,6 +1634,9 @@ static void *si_texture_transfer_map(struct pipe_context *ctx, struct pipe_resou assert(!(texture->flags & SI_RESOURCE_FLAG_FORCE_LINEAR)); assert(box->width && box->height && box->depth); + if (tex->buffer.flags & RADEON_FLAG_ENCRYPTED) + return NULL; + if (tex->is_depth) { /* Depth textures use staging unconditionally. */ use_staging_texture = true;