radeonsi: force using staging texture when uploading to secure texture
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 28 Feb 2020 16:10:45 +0000 (17:10 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 11 May 2020 08:25:53 +0000 (10:25 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4401>

src/gallium/drivers/radeonsi/si_texture.c

index ab2a234f16ab1ec758d9d5ccc6da09944647d329..8856f0a75ced7f2f2cb6b56bb957032be2a8c8f9 100644 (file)
@@ -1660,7 +1660,7 @@ static void *si_texture_transfer_map(struct pipe_context *ctx, struct pipe_resou
        * Use the staging texture for uploads if the underlying BO
        * is busy.
        */
-      if (!tex->surface.is_linear)
+      if (!tex->surface.is_linear || (tex->buffer.flags & RADEON_FLAG_ENCRYPTED))
          use_staging_texture = true;
       else if (usage & PIPE_TRANSFER_READ)
          use_staging_texture =