radeonsi/tmz: fail si_texture_transfer_map if tex is encrypted

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-07-23 16:46:40 +02:00 committed by Marge Bot
parent 55b018b634
commit de088daccc

View file

@ -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;