[Mesa-dev] [PATCH 3/4] amd/common: more use of i32_1

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Dec 12 17:10:22 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/common/ac_nir_to_llvm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 799ba83e89..189421cc4a 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1989,7 +1989,7 @@ get_buffer_size(struct ac_nir_context *ctx, LLVMValueRef descriptor, bool in_ele
 		 */
 		LLVMValueRef stride =
 			LLVMBuildExtractElement(ctx->ac.builder, descriptor,
-						LLVMConstInt(ctx->ac.i32, 1, false), "");
+						ctx->ac.i32_1, "");
 		stride = LLVMBuildLShr(ctx->ac.builder, stride,
 				       LLVMConstInt(ctx->ac.i32, 16, false), "");
 		stride = LLVMBuildAnd(ctx->ac.builder, stride,
@@ -6056,20 +6056,20 @@ write_tess_factors(struct nir_to_llvm_context *ctx)
 	if (ctx->options->key.tcs.primitive_mode == GL_ISOLINES) {
 		outer[0] = out[1] = ac_lds_load(&ctx->ac, lds_outer);
 		lds_outer = LLVMBuildAdd(ctx->builder, lds_outer,
-					 LLVMConstInt(ctx->ac.i32, 1, false), "");
+					 ctx->ac.i32_1, "");
 		outer[1] = out[0] = ac_lds_load(&ctx->ac, lds_outer);
 	} else {
 		for (i = 0; i < outer_comps; i++) {
 			outer[i] = out[i] =
 				ac_lds_load(&ctx->ac, lds_outer);
 			lds_outer = LLVMBuildAdd(ctx->builder, lds_outer,
-						 LLVMConstInt(ctx->ac.i32, 1, false), "");
+						 ctx->ac.i32_1, "");
 		}
 		for (i = 0; i < inner_comps; i++) {
 			inner[i] = out[outer_comps+i] =
 				ac_lds_load(&ctx->ac, lds_inner);
 			lds_inner = LLVMBuildAdd(ctx->builder, lds_inner,
-						 LLVMConstInt(ctx->ac.i32, 1, false), "");
+						 ctx->ac.i32_1, "");
 		}
 	}
 
-- 
2.15.1



More information about the mesa-dev mailing list