[Mesa-dev] [PATCH 3/3] r600g: set ENABLE_KILL on evergreen too

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Sat Sep 25 07:11:42 PDT 2010


---
 src/gallium/drivers/r600/evergreen_state.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 5026f21..d77129b 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1511,7 +1511,7 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader
 	struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
 	struct r600_pipe_state *rstate = &shader->rstate;
 	struct r600_shader *rshader = &shader->shader;
-	unsigned i, tmp, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z;
+	unsigned i, tmp, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z,db_shader_control;
 	boolean have_pos = FALSE, have_face = FALSE;
 
 	/* clear previous register */
@@ -1582,6 +1582,13 @@ void evergreen_pipe_shader_ps(struct pipe_context *ctx, struct r600_pipe_shader
 				S_0286E0_PERSP_CENTROID_ENA(1) |
 				S_0286E0_LINEAR_CENTROID_ENA(1),
 				0xFFFFFFFF, NULL);
+
+	db_shader_control = 0;
+	if (rshader->uses_kill)
+		db_shader_control |= S_02880C_KILL_ENABLE(1);
+
+	/* only set some bits here, the other bits are set in the dsa state */
+	r600_pipe_state_add_reg(rstate, EVERGREEN_GROUP_CONTEXT, R_02880C_DB_SHADER_CONTROL, db_shader_control, 0x00000041, NULL);
 }
 
 void evergreen_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader)
-- 
1.7.1



More information about the mesa-dev mailing list