ac: add glc parameter to ac_build_buffer_load_format
authorMarek Olšák <marek.olsak@amd.com>
Tue, 30 Jan 2018 18:24:07 +0000 (19:24 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 1 Feb 2018 15:20:19 +0000 (16:20 +0100)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_llvm_build.c
src/amd/common/ac_llvm_build.h
src/amd/common/ac_nir_to_llvm.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c

index a5cb72daed544712ca24e497680cd2ace8cd3bad..762351f2807111f42c2f3c1565b8f9aa6c4ea10a 100644 (file)
@@ -1049,10 +1049,11 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
                                         LLVMValueRef vindex,
                                         LLVMValueRef voffset,
                                         unsigned num_channels,
+                                        bool glc,
                                         bool can_speculate)
 {
        return ac_build_buffer_load_common(ctx, rsrc, vindex, voffset,
-                                          num_channels, false, false,
+                                          num_channels, glc, false,
                                           can_speculate, true);
 }
 
index 3ae96781b6f05812b9dc6223744845ccdc496321..f95ad6a27c16a1b62db7cb6078ef6c743c671cf5 100644 (file)
@@ -219,6 +219,7 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
                                         LLVMValueRef vindex,
                                         LLVMValueRef voffset,
                                         unsigned num_channels,
+                                        bool glc,
                                         bool can_speculate);
 
 LLVMValueRef
index 04fe51935a7eb82c6347eec2c0620db6703ce82d..75d7b12995746c3161a5fdc459c857370b0c8112 100644 (file)
@@ -2298,7 +2298,7 @@ static LLVMValueRef build_tex_intrinsic(struct ac_nir_context *ctx,
                                                   args->addr,
                                                   ctx->ac.i32_0,
                                                   util_last_bit(mask),
-                                                  true);
+                                                  false, true);
        }
 
        args->opcode = ac_image_sample;
@@ -5356,7 +5356,7 @@ handle_vs_input_decl(struct nir_to_llvm_context *ctx,
                input = ac_build_buffer_load_format(&ctx->ac, t_list,
                                                    buffer_index,
                                                    ctx->ac.i32_0,
-                                                   4, true);
+                                                   4, false, true);
 
                for (unsigned chan = 0; chan < 4; chan++) {
                        LLVMValueRef llvm_chan = LLVMConstInt(ctx->ac.i32, chan, false);
index 78156f1edec491bdaf755f696c2075ed5f7e21d1..7b2dc8daf6ec189b1cbc4d7402c89f977cd6f2c0 100644 (file)
@@ -611,7 +611,7 @@ void si_llvm_load_input_vs(
 
                input[i] = ac_build_buffer_load_format(&ctx->ac, t_list,
                                                       vertex_index, voffset,
-                                                      num_channels, true);
+                                                      num_channels, false, true);
                input[i] = ac_build_expand_to_vec4(&ctx->ac, input[i], num_channels);
        }
 
index 42cb3251e78e9597c5ba43a27e37ee59134b5e14..d89907e11765a054812ed40acbe4391e04f998f4 100644 (file)
@@ -1828,7 +1828,7 @@ static void build_tex_intrinsic(const struct lp_build_tgsi_action *action,
                                                    emit_data->args[0],
                                                    emit_data->args[2],
                                                    emit_data->args[1],
-                                                   num_channels, true);
+                                                   num_channels, false, true);
                emit_data->output[emit_data->chan] =
                        ac_build_expand_to_vec4(&ctx->ac, result, num_channels);
                return;