summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2019-09-24 16:56:57 -0400
committerDylan Baker <dylan@pnwbakers.com>2019-10-01 15:29:22 -0700
commit0b97377f5840728daba339b21abf0ca0bb00eb3a (patch)
tree9c70775bdd5a2e78003550a60430c6d13b62ad1b
parent33eecbcc9bdf197a82477d01e4aa3c1d853bc392 (diff)
radeonsi/gfx10: fix corruption for chips with harvested TCCs
Cc: 19.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit 235ebe91633e7f47518118983e0e6f5c632b25a4)
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 41a6f5cebae..734763b9d07 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -1700,7 +1700,9 @@ si_make_CB_shader_coherent(struct si_context *sctx, unsigned num_samples,
SI_CONTEXT_INV_VCACHE;
if (sctx->chip_class >= GFX10) {
- if (shaders_read_metadata)
+ if (sctx->screen->info.tcc_harvested)
+ sctx->flags |= SI_CONTEXT_INV_L2;
+ else if (shaders_read_metadata)
sctx->flags |= SI_CONTEXT_INV_L2_METADATA;
} else if (sctx->chip_class == GFX9) {
/* Single-sample color is coherent with shaders on GFX9, but
@@ -1726,7 +1728,9 @@ si_make_DB_shader_coherent(struct si_context *sctx, unsigned num_samples,
SI_CONTEXT_INV_VCACHE;
if (sctx->chip_class >= GFX10) {
- if (shaders_read_metadata)
+ if (sctx->screen->info.tcc_harvested)
+ sctx->flags |= SI_CONTEXT_INV_L2;
+ else if (shaders_read_metadata)
sctx->flags |= SI_CONTEXT_INV_L2_METADATA;
} else if (sctx->chip_class == GFX9) {
/* Single-sample depth (not stencil) is coherent with shaders