mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
radeonsi: allow write-only mapping of encrypted textures
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11107>
This commit is contained in:
parent
fcdfe91efa
commit
b377da9122
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue