radeonsi: do not use cmask with encrypted texture
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 7 May 2020 19:45:49 +0000 (21:45 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 11 May 2020 08:26:05 +0000 (10:26 +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_clear.c

index 096680ccdacfa5c38c444d354a841c690680837b..e96903d24efef812d546082b9571642b8c4a77d9 100644 (file)
@@ -503,6 +503,10 @@ static void si_do_fast_color_clear(struct si_context *sctx, unsigned *buffers,
          if (sctx->family == CHIP_STONEY)
             continue;
 
+         /* Disable fast clear if tex is encrypted */
+         if (tex->buffer.flags & RADEON_FLAG_ENCRYPTED)
+            continue;
+
          /* ensure CMASK is enabled */
          si_alloc_separate_cmask(sctx->screen, tex);
          if (!tex->cmask_buffer)