[Mesa-dev] [PATCH 2/3] radeonsi: fix calculation of valid RB mask per SE

Nicolai Hähnle nhaehnle at gmail.com
Fri Jun 17 14:09:08 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

The old calculation treated too many RBs as disabled.

Cc: 11.0 11.1 11.2 12.0 <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_state.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 0c52eee..397ce66 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3522,10 +3522,15 @@ si_write_harvested_raster_configs(struct si_context *sctx,
 	unsigned se_mask[4];
 	unsigned se;
 
-	se_mask[0] = ((1 << rb_per_se) - 1) & rb_mask;
-	se_mask[1] = (se_mask[0] << rb_per_se) & rb_mask;
-	se_mask[2] = (se_mask[1] << rb_per_se) & rb_mask;
-	se_mask[3] = (se_mask[2] << rb_per_se) & rb_mask;
+	se_mask[0] = ((1 << rb_per_se) - 1);
+	se_mask[1] = (se_mask[0] << rb_per_se);
+	se_mask[2] = (se_mask[1] << rb_per_se);
+	se_mask[3] = (se_mask[2] << rb_per_se);
+
+	se_mask[0] &= rb_mask;
+	se_mask[1] &= rb_mask;
+	se_mask[2] &= rb_mask;
+	se_mask[3] &= rb_mask;
 
 	assert(num_se == 1 || num_se == 2 || num_se == 4);
 	assert(sh_per_se == 1 || sh_per_se == 2);
-- 
2.7.4



More information about the mesa-dev mailing list