[Mesa-dev] [PATCH 07/11] radeonsi: remove dead code in declare_input_fs

Marek Olšák maraeo at gmail.com
Thu Jun 1 18:18:25 UTC 2017


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

Colors are interpolated in the PS prolog. This was never used.
---
 src/gallium/drivers/radeonsi/si_shader.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 3a86c0b..5c7deeb 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1360,25 +1360,20 @@ static void declare_input_fs(
 	}
 
 	interp_param_idx = lookup_interp_param_index(decl->Interp.Interpolate,
 						     decl->Interp.Location);
 	if (interp_param_idx == -1)
 		return;
 	else if (interp_param_idx) {
 		interp_param = LLVMGetParam(ctx->main_fn, interp_param_idx);
 	}
 
-	if (decl->Semantic.Name == TGSI_SEMANTIC_COLOR &&
-	    decl->Interp.Interpolate == TGSI_INTERPOLATE_COLOR &&
-	    ctx->shader->key.part.ps.prolog.flatshade_colors)
-		interp_param = NULL; /* load the constant color */
-
 	interp_fs_input(ctx, input_index, decl->Semantic.Name,
 			decl->Semantic.Index, shader->selector->info.num_inputs,
 			shader->selector->info.colors_read, interp_param,
 			LLVMGetParam(main_fn, SI_PARAM_PRIM_MASK),
 			LLVMGetParam(main_fn, SI_PARAM_FRONT_FACE),
 			&out[0]);
 }
 
 static LLVMValueRef get_sample_id(struct si_shader_context *ctx)
 {
-- 
2.7.4



More information about the mesa-dev mailing list