From c668bdf05cf3aa6907b678c35805962ea79b258b Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 7 May 2020 21:45:49 +0200 Subject: [PATCH] radeonsi: do not use cmask with encrypted texture MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_clear.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index 096680ccdac..e96903d24ef 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -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) -- 2.30.2