Module: Mesa Branch: main Commit: b377da912259eceee06cf678938ea667a79137a7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b377da912259eceee06cf678938ea667a79137a7
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Tue Jun 1 14:03:37 2021 +0200 radeonsi: allow write-only mapping of encrypted textures Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107> --- src/gallium/drivers/radeonsi/si_texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index f15ed38b6ec..6e23c1b828a 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1728,7 +1728,7 @@ static void *si_texture_transfer_map(struct pipe_context *ctx, struct pipe_resou struct si_resource *buf; unsigned offset = 0; char *map; - bool use_staging_texture = false; + bool use_staging_texture = tex->buffer.flags & RADEON_FLAG_ENCRYPTED; assert(!(texture->flags & SI_RESOURCE_FLAG_FORCE_LINEAR)); assert(box->width && box->height && box->depth); @@ -1736,7 +1736,7 @@ static void *si_texture_transfer_map(struct pipe_context *ctx, struct pipe_resou if (tex->buffer.b.b.flags & SI_RESOURCE_AUX_PLANE) return NULL; - if (tex->buffer.flags & RADEON_FLAG_ENCRYPTED) + if ((tex->buffer.flags & RADEON_FLAG_ENCRYPTED) && usage & PIPE_MAP_READ) return NULL; if (tex->is_depth) { _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
