r600g: set ENABLE_KILL on evergreen too
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 25 Sep 2010 14:11:42 +0000 (16:11 +0200)
committerJerome Glisse <jglisse@redhat.com>
Sun, 26 Sep 2010 16:23:41 +0000 (12:23 -0400)
src/gallium/drivers/r600/evergreen_state.c

index c54b78aa6f05393ae8d8d3b5844e387e815277a2..7031e4cc77d554348804cb033342a2c710c803a8 100644 (file)
@@ -1576,6 +1576,14 @@ 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);
+
+       if (rshader->uses_kill) {
+               /* 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,
+                                       S_02880C_KILL_ENABLE(1),
+                                       S_02880C_KILL_ENABLE(1), NULL);
+       }
 }
 
 void evergreen_pipe_shader_vs(struct pipe_context *ctx, struct r600_pipe_shader *shader)