[Mesa-dev] [PATCH 02/16] radeonsi: remove vs.ucps_enabled from the shader key

Marek Olšák maraeo at gmail.com
Sat Oct 4 15:42:05 PDT 2014


From: Marek Olšák <marek.olsak at amd.com>

Written CLIPDIST outputs are simply disabled in PA_CL_VS_OUT_CNTL.
---
 src/gallium/drivers/radeonsi/si_shader.c | 6 ------
 src/gallium/drivers/radeonsi/si_shader.h | 1 -
 src/gallium/drivers/radeonsi/si_state.c  | 8 --------
 3 files changed, 15 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index e21cb76..c9e6792 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -870,9 +870,6 @@ static void si_llvm_emit_clipvertex(struct lp_build_tgsi_context * bld_base,
 	for (reg_index = 0; reg_index < 2; reg_index ++) {
 		LLVMValueRef *args = pos[2 + reg_index];
 
-		if (!(shader->key.vs.ucps_enabled & (1 << reg_index)))
-			continue;
-
 		shader->clip_dist_write |= 0xf << (4 * reg_index);
 
 		args[5] =
@@ -1175,9 +1172,6 @@ handle_semantic:
 			param_count++;
 			break;
 		case TGSI_SEMANTIC_CLIPDIST:
-			if (!(si_shader_ctx->shader->key.vs.ucps_enabled &
-			      (1 << semantic_index)))
-				continue;
 			shader->clip_dist_write |=
 				0xf << (semantic_index * 4);
 			target = V_008DFC_SQ_EXP_POS + 2 + semantic_index;
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index 43a4e65..76c29fe 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -145,7 +145,6 @@ union si_shader_key {
 		/* The mask of "get_unique_index" bits, needed for ES,
 		 * it describes how the ES->GS ring buffer is laid out. */
 		uint64_t	gs_used_inputs;
-		unsigned	ucps_enabled:2;
 		unsigned	as_es:1;
 	} vs;
 };
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 57bfa59..cff2e8a 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2193,14 +2193,6 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx,
 	struct si_context *sctx = (struct si_context *)ctx;
 	memset(key, 0, sizeof(*key));
 
-	if ((sel->type == PIPE_SHADER_VERTEX || sel->type == PIPE_SHADER_GEOMETRY) &&
-	    sctx->queued.named.rasterizer) {
-		if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf0)
-			key->vs.ucps_enabled |= 0x2;
-		if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf)
-			key->vs.ucps_enabled |= 0x1;
-	}
-
 	if (sel->type == PIPE_SHADER_VERTEX) {
 		unsigned i;
 		if (!sctx->vertex_elements)
-- 
1.9.1



More information about the mesa-dev mailing list