[Mesa-dev] [PATCH 1/2] radeonsi: rename ddxy_lds to lds

Dave Airlie airlied at gmail.com
Tue Jul 21 16:06:09 PDT 2015


From: Dave Airlie <airlied at redhat.com>

This is picked from Marek's tess work, and I think
it makes sense to just do it first.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/radeonsi/si_shader.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 0c01c90..a944547 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -75,7 +75,7 @@ struct si_shader_context
 	LLVMTargetMachineRef tm;
 	LLVMValueRef const_md;
 	LLVMValueRef const_resource[SI_NUM_CONST_BUFFERS];
-	LLVMValueRef ddxy_lds;
+	LLVMValueRef lds;
 	LLVMValueRef *constants[SI_NUM_CONST_BUFFERS];
 	LLVMValueRef resources[SI_NUM_SAMPLER_VIEWS];
 	LLVMValueRef samplers[SI_NUM_SAMPLER_STATES];
@@ -2210,7 +2210,7 @@ static void si_llvm_emit_ddxy(
 	indices[0] = bld_base->uint_bld.zero;
 	indices[1] = build_intrinsic(gallivm->builder, "llvm.SI.tid", i32,
 				     NULL, 0, LLVMReadNoneAttribute);
-	store_ptr = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	store_ptr = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				 indices, 2, "");
 
 	if (opcode == TGSI_OPCODE_DDX_FINE)
@@ -2221,7 +2221,7 @@ static void si_llvm_emit_ddxy(
 		mask = 0xfffffffc;
 	indices[1] = LLVMBuildAnd(gallivm->builder, indices[1],
 				  lp_build_const_int32(gallivm, mask), "");
-	load_ptr0 = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	load_ptr0 = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				 indices, 2, "");
 
 	idx = (opcode == TGSI_OPCODE_DDX || opcode == TGSI_OPCODE_DDX_FINE) ? 1 :2;
@@ -2229,7 +2229,7 @@ static void si_llvm_emit_ddxy(
 				  lp_build_const_int32(gallivm,
 						       idx),
 				  "");
-	load_ptr1 = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	load_ptr1 = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				 indices, 2, "");
 
 	for (c = 0; c < 4; ++c) {
@@ -2282,7 +2282,7 @@ static LLVMValueRef si_llvm_emit_ddxy_interp(
 	indices[0] = bld_base->uint_bld.zero;
 	indices[1] = build_intrinsic(gallivm->builder, "llvm.SI.tid", i32,
 				     NULL, 0, LLVMReadNoneAttribute);
-	store_ptr = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	store_ptr = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				 indices, 2, "");
 
         temp = LLVMBuildAnd(gallivm->builder, indices[1],
@@ -2292,25 +2292,25 @@ static LLVMValueRef si_llvm_emit_ddxy_interp(
 			     lp_build_const_int32(gallivm, 0xfffffffd), "");
 
 	indices[1] = temp;
-	load_ptr_x = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	load_ptr_x = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				  indices, 2, "");
 
 	indices[1] = temp2;
-	load_ptr_y = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	load_ptr_y = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				  indices, 2, "");
 
 	indices[1] = LLVMBuildAdd(gallivm->builder, temp,
 				  lp_build_const_int32(gallivm,
 						       1),
 				  "");
-	load_ptr_ddx = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	load_ptr_ddx = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				 indices, 2, "");
 
 	indices[1] = LLVMBuildAdd(gallivm->builder, temp2,
 				  lp_build_const_int32(gallivm,
 						       2),
 				  "");
-	load_ptr_ddy = LLVMBuildGEP(gallivm->builder, si_shader_ctx->ddxy_lds,
+	load_ptr_ddy = LLVMBuildGEP(gallivm->builder, si_shader_ctx->lds,
 				 indices, 2, "");
 
 	for (c = 0; c < 2; ++c) {
@@ -2743,7 +2743,7 @@ static void create_function(struct si_shader_context *si_shader_ctx)
 	     bld_base->info->opcode_count[TGSI_OPCODE_DDY_FINE] > 0 ||
 	     bld_base->info->opcode_count[TGSI_OPCODE_INTERP_OFFSET] > 0 ||
 	     bld_base->info->opcode_count[TGSI_OPCODE_INTERP_SAMPLE] > 0))
-		si_shader_ctx->ddxy_lds =
+		si_shader_ctx->lds =
 			LLVMAddGlobalInAddressSpace(gallivm->module,
 						    LLVMArrayType(i32, 64),
 						    "ddxy_lds",
-- 
2.4.3



More information about the mesa-dev mailing list