[Mesa-dev] [PATCH 08/23] radeonsi: rename members of si_shader_output_values

Nicolai Hähnle nhaehnle at gmail.com
Wed Nov 30 13:35:10 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Be a bit more verbose and avoid confusion in future patches.
---
 src/gallium/drivers/radeonsi/si_shader.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index aac3091..c488f91 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -48,22 +48,22 @@
 
 static const char *scratch_rsrc_dword0_symbol =
 	"SCRATCH_RSRC_DWORD0";
 
 static const char *scratch_rsrc_dword1_symbol =
 	"SCRATCH_RSRC_DWORD1";
 
 struct si_shader_output_values
 {
 	LLVMValueRef values[4];
-	unsigned name;
-	unsigned sid;
+	unsigned semantic_name;
+	unsigned semantic_index;
 };
 
 static void si_init_shader_ctx(struct si_shader_context *ctx,
 			       struct si_screen *sscreen,
 			       struct si_shader *shader,
 			       LLVMTargetMachineRef tm);
 
 static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action,
 				 struct lp_build_tgsi_context *bld_base,
 				 struct lp_build_emit_data *emit_data);
@@ -2272,22 +2272,22 @@ static void si_llvm_export_vs(struct lp_build_tgsi_context *bld_base,
 	unsigned target;
 	unsigned param_count = 0;
 	unsigned pos_idx;
 	int i;
 
 	if (outputs && ctx->shader->selector->so.num_outputs) {
 		si_llvm_emit_streamout(ctx, outputs, noutput);
 	}
 
 	for (i = 0; i < noutput; i++) {
-		semantic_name = outputs[i].name;
-		semantic_index = outputs[i].sid;
+		semantic_name = outputs[i].semantic_name;
+		semantic_index = outputs[i].semantic_index;
 		bool export_param = true;
 
 		switch (semantic_name) {
 		case TGSI_SEMANTIC_POSITION: /* ignore these */
 		case TGSI_SEMANTIC_PSIZE:
 		case TGSI_SEMANTIC_CLIPVERTEX:
 		case TGSI_SEMANTIC_EDGEFLAG:
 			break;
 		case TGSI_SEMANTIC_GENERIC:
 		case TGSI_SEMANTIC_CLIPDIST:
@@ -2786,22 +2786,22 @@ static void si_llvm_emit_vs_epilogue(struct lp_build_tgsi_context *bld_base)
 				val = si_llvm_saturate(bld_base, val);
 				LLVMBuildStore(gallivm->builder, val, addr);
 			}
 		}
 
 		if (cond)
 			lp_build_endif(&if_ctx);
 	}
 
 	for (i = 0; i < info->num_outputs; i++) {
-		outputs[i].name = info->output_semantic_name[i];
-		outputs[i].sid = info->output_semantic_index[i];
+		outputs[i].semantic_name = info->output_semantic_name[i];
+		outputs[i].semantic_index = info->output_semantic_index[i];
 
 		for (j = 0; j < 4; j++)
 			outputs[i].values[j] =
 				LLVMBuildLoad(gallivm->builder,
 					      ctx->soa.outputs[i][j],
 					      "");
 	}
 
 	/* Return the primitive ID from the LLVM function. */
 	ctx->return_value =
@@ -6223,22 +6223,22 @@ si_generate_gs_copy_shader(struct si_screen *sscreen,
 	args[4] = uint->one;  /* OFFEN */
 	args[5] = uint->zero; /* IDXEN */
 	args[6] = uint->one;  /* GLC */
 	args[7] = uint->one;  /* SLC */
 	args[8] = uint->zero; /* TFE */
 
 	/* Fetch vertex data from GSVS ring */
 	for (i = 0; i < gsinfo->num_outputs; ++i) {
 		unsigned chan;
 
-		outputs[i].name = gsinfo->output_semantic_name[i];
-		outputs[i].sid = gsinfo->output_semantic_index[i];
+		outputs[i].semantic_name = gsinfo->output_semantic_name[i];
+		outputs[i].semantic_index = gsinfo->output_semantic_index[i];
 
 		for (chan = 0; chan < 4; chan++) {
 			args[2] = lp_build_const_int32(gallivm,
 						       (i * 4 + chan) *
 						       gs_selector->gs_max_out_vertices * 16 * 4);
 
 			outputs[i].values[chan] =
 				LLVMBuildBitCast(gallivm->builder,
 						 lp_build_intrinsic(gallivm->builder,
 								 "llvm.SI.buffer.load.dword.i32.i32",
-- 
2.7.4



More information about the mesa-dev mailing list