[Mesa-dev] [PATCH 07/10] radeonsi: don't use info.num_inputs when it's unused

Marek Olšák maraeo at gmail.com
Sat Jul 8 00:42:16 UTC 2017


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

For clarity. It's only used by color interpolation.
---
 src/gallium/drivers/radeonsi/si_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index ad1fb7b..157cb51 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1348,21 +1348,21 @@ 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);
 	}
 
 	interp_fs_input(ctx, input_index, decl->Semantic.Name,
-			decl->Semantic.Index, shader->selector->info.num_inputs,
+			decl->Semantic.Index, 0, /* this param is unused */
 			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)
 {
 	return unpack_param(ctx, SI_PARAM_ANCILLARY, 8, 4);
 }
-- 
2.7.4



More information about the mesa-dev mailing list