From ced465b4e0842f9f03cf04fb3d46caaf018f6b82 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 28 Oct 2021 11:56:01 +0200 Subject: [PATCH] radeonsi/sdma: fix bogus assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src can use dcc even for non sdma v5 variants because si_decompress_dcc is called in si_sdma_copy_image. Fixes: 46c95047bd7 ("radeonsi: implement si_sdma_copy_image for gfx7+") Reviewed-by: Marek Olšák Part-of: (cherry picked from commit d86d602ed0c75c30840ca6bac98556ffa99304ea) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_sdma_copy_image.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e1cabb2d2d0..399894f9565 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1732,7 +1732,7 @@ "description": "radeonsi/sdma: fix bogus assert", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "46c95047bd77f6e824e4edccad590da8a1823fb4" }, diff --git a/src/gallium/drivers/radeonsi/si_sdma_copy_image.c b/src/gallium/drivers/radeonsi/si_sdma_copy_image.c index 3120add84e0..49d27962549 100644 --- a/src/gallium/drivers/radeonsi/si_sdma_copy_image.c +++ b/src/gallium/drivers/radeonsi/si_sdma_copy_image.c @@ -161,8 +161,7 @@ bool si_sdma_v4_v5_copy_texture(struct si_context *sctx, struct si_texture *sdst uint64_t linear_address = linear == ssrc ? src_address : dst_address; struct radeon_cmdbuf *cs = sctx->sdma_cs; /* Only SDMA 5 supports DCC with SDMA */ - bool dcc = vi_dcc_enabled(tiled, 0); - assert(!dcc || is_v5); + bool dcc = vi_dcc_enabled(tiled, 0) && is_v5; assert(tiled->buffer.b.b.depth0 == 1); linear_address += linear->surface.u.gfx9.offset[0];