Mesa (master): radeonsi/tmz: fail si_texture_transfer_map if tex is encrypted

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 24 15:06:53 UTC 2020


Module: Mesa
Branch: master
Commit: de088daccc2b5d0c7dca1d09d827f225ba8e4d53
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=de088daccc2b5d0c7dca1d09d827f225ba8e4d53

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Thu Jul 23 16:46:40 2020 +0200

radeonsi/tmz: fail si_texture_transfer_map if tex is encrypted

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049>

---

 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;



More information about the mesa-commit mailing list