[Mesa-dev] [PATCH] radeonsi: Since we're not using HiS, use more buffer space for HiZ.

Andreas Hartmetz ahartmetz at gmail.com
Fri Dec 13 07:58:03 PST 2013


Also move a comment that was in the wrong place.
---
 src/gallium/drivers/radeonsi/si_state.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index d99cfe8..ee2372f 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1751,7 +1751,7 @@ void si_update_db_draw_state(struct r600_context *rctx, struct r600_surface *zsb
 
 	/* db */
 
-	/* TODO HiS aka stencil buffer htile goes here */
+	/* not using HiS aka stencil buffer htile for now, the benefits are unclear */
 	db_render_override = S_02800C_FORCE_HIS_ENABLE0(V_02800C_FORCE_DISABLE) |
 			     S_02800C_FORCE_HIS_ENABLE1(V_02800C_FORCE_DISABLE);
 
@@ -1763,6 +1763,7 @@ void si_update_db_draw_state(struct r600_context *rctx, struct r600_surface *zsb
 		hiz_enable = rtex->htile_buffer && !level;
 	}
 	if (hiz_enable) {
+		/* Force off means no force, DB_SHADER_CONTROL decides */
 		db_render_override |= S_02800C_FORCE_HIZ_ENABLE(V_02800C_FORCE_OFF);
 	} else {
 		db_render_override |= S_02800C_FORCE_HIZ_ENABLE(V_02800C_FORCE_DISABLE);
@@ -1877,7 +1878,8 @@ static void si_db(struct r600_context *rctx, struct si_pm4_state *pm4,
 	/* use htile only for first level */
 	if (rtex->htile_buffer && !level) {
 		z_info |= S_028040_TILE_SURFACE_ENABLE(1);
-		/* Force off means no force, DB_SHADER_CONTROL decides */
+		/* we are not using HiS for now, so use more of the buffer for HiZ */
+		s_info |= S_028044_TILE_STENCIL_DISABLE(1);
 		uint64_t va = r600_resource_va(&rctx->screen->b.b, &rtex->htile_buffer->b.b);
 		db_htile_data_base = va >> 8;
 		db_htile_surface = S_028ABC_FULL_CACHE(1);
-- 
1.8.3.2



More information about the mesa-dev mailing list