summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2018-01-30 19:24:07 +0100
committerMarek Olšák <marek.olsak@amd.com>2018-02-01 16:20:19 +0100
commitbac9fa9f17f86d16a25afde724985f7ae0ec1322 (patch)
tree33d14c073f0439bab01e805b5608ba80ce91e6af /src
parentbe973ed21f6e456ebd753f26a99151d9ea6e765c (diff)
ac: add glc parameter to ac_build_buffer_load_format
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_llvm_build.c3
-rw-r--r--src/amd/common/ac_llvm_build.h1
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c2
5 files changed, 7 insertions, 5 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index a5cb72daed..762351f280 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -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);
}
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index 3ae96781b6..f95ad6a27c 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -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
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 04fe51935a..75d7b12995 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -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);
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 78156f1ede..7b2dc8daf6 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -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);
}
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
index 42cb3251e7..d89907e117 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
@@ -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;