Mesa (staging/21.3): radeonsi/gfx8: use the proper dcc clear size
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 7 23:06:49 UTC 2022
Module: Mesa
Branch: staging/21.3
Commit: 301c393d25a921cdd91f38525f2421764deeed8a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=301c393d25a921cdd91f38525f2421764deeed8a
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Wed Jan 5 16:06:25 2022 +0100
radeonsi/gfx8: use the proper dcc clear size
dcc_fast_clear_size is assigned using addrlib's dccFastClearSize, which
is computed using the whole surface size (including layers) so we don't
need to multiply dcc_fast_clear_size by num_layers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4530
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14409>
(cherry picked from commit d84e0096a5daa7c8bdd29c16b4bb15e7d062d80e)
---
.pick_status.json | 2 +-
src/gallium/drivers/radeonsi/si_clear.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 78f89d58ab8..a1c7f86b796 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -733,7 +733,7 @@
"description": "radeonsi/gfx8: use the proper dcc clear size",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c
index 63ff2c893c2..14c6839a7ee 100644
--- a/src/gallium/drivers/radeonsi/si_clear.c
+++ b/src/gallium/drivers/radeonsi/si_clear.c
@@ -352,7 +352,7 @@ bool vi_dcc_get_clear_info(struct si_context *sctx, struct si_texture *tex, unsi
return false;
dcc_offset += tex->surface.u.legacy.color.dcc_level[level].dcc_offset;
- clear_size = tex->surface.u.legacy.color.dcc_level[level].dcc_fast_clear_size * num_layers;
+ clear_size = tex->surface.u.legacy.color.dcc_level[level].dcc_fast_clear_size;
}
si_init_buffer_clear(out, dcc_buffer, dcc_offset, clear_size, clear_value);
More information about the mesa-commit
mailing list