amd/common: more use of i32_1
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Dec 2017 17:10:22 +0000 (18:10 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 14 Dec 2017 21:24:42 +0000 (22:24 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c

index 4ce8c8f0b69e47f6e8d3c1f99aa0ff988b11dc83..25bdb341e0a9d91f79523da70ef9bf1ce5b7aec1 100644 (file)
@@ -1996,7 +1996,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,
@@ -6084,20 +6084,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, "");
                }
        }