summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-05-25 16:13:54 +0200
committerMarek Olšák <[email protected]>2017-05-29 01:52:16 +0200
commite1942c970ff0f5602cfc42b9954eadfc2562c952 (patch)
treea7810acf7dbac71d9cc779088bb0746a4c876724 /src/gallium
parent24306c0b2783bde3e1545d10effefa13d58667c4 (diff)
radeonsi: rename readonly_memory -> can_speculate
This is more accurate. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c10
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c18
2 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 61f1384ad7a..212f558d9bb 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -823,7 +823,7 @@ static LLVMValueRef get_tcs_tes_buffer_address_from_reg(
static LLVMValueRef buffer_load(struct lp_build_tgsi_context *bld_base,
enum tgsi_opcode_type type, unsigned swizzle,
LLVMValueRef buffer, LLVMValueRef offset,
- LLVMValueRef base, bool readonly_memory)
+ LLVMValueRef base, bool can_speculate)
{
struct si_shader_context *ctx = si_shader_context(bld_base);
struct gallivm_state *gallivm = &ctx->gallivm;
@@ -833,14 +833,14 @@ static LLVMValueRef buffer_load(struct lp_build_tgsi_context *bld_base,
if (swizzle == ~0) {
value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset,
- 0, 1, 0, readonly_memory);
+ 0, 1, 0, can_speculate);
return LLVMBuildBitCast(gallivm->builder, value, vec_type, "");
}
if (!tgsi_type_is_64bit(type)) {
value = ac_build_buffer_load(&ctx->ac, buffer, 4, NULL, base, offset,
- 0, 1, 0, readonly_memory);
+ 0, 1, 0, can_speculate);
value = LLVMBuildBitCast(gallivm->builder, value, vec_type, "");
return LLVMBuildExtractElement(gallivm->builder, value,
@@ -848,10 +848,10 @@ static LLVMValueRef buffer_load(struct lp_build_tgsi_context *bld_base,
}
value = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset,
- swizzle * 4, 1, 0, readonly_memory);
+ swizzle * 4, 1, 0, can_speculate);
value2 = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset,
- swizzle * 4 + 4, 1, 0, readonly_memory);
+ swizzle * 4 + 4, 1, 0, can_speculate);
return si_llvm_emit_fetch_64bit(bld_base, type, value, value2);
}
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
index bd8ecb70f8c..e2be9e57c8b 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_mem.c
@@ -393,11 +393,11 @@ static void load_fetch_args(
}
}
-static unsigned get_load_intr_attribs(bool readonly_memory)
+static unsigned get_load_intr_attribs(bool can_speculate)
{
/* READNONE means writes can't affect it, while READONLY means that
* writes can affect it. */
- return readonly_memory && HAVE_LLVM >= 0x0400 ?
+ return can_speculate && HAVE_LLVM >= 0x0400 ?
LP_FUNC_ATTR_READNONE :
LP_FUNC_ATTR_READONLY;
}
@@ -411,7 +411,7 @@ static unsigned get_store_intr_attribs(bool writeonly_memory)
static void load_emit_buffer(struct si_shader_context *ctx,
struct lp_build_emit_data *emit_data,
- bool readonly_memory)
+ bool can_speculate)
{
const struct tgsi_full_instruction *inst = emit_data->inst;
struct gallivm_state *gallivm = &ctx->gallivm;
@@ -439,7 +439,7 @@ static void load_emit_buffer(struct si_shader_context *ctx,
emit_data->output[emit_data->chan] = lp_build_intrinsic(
builder, intrinsic_name, dst_type,
emit_data->args, emit_data->arg_count,
- get_load_intr_attribs(readonly_memory));
+ get_load_intr_attribs(can_speculate));
}
static LLVMValueRef get_memory_ptr(struct si_shader_context *ctx,
@@ -561,7 +561,7 @@ static void load_emit(
const struct tgsi_full_instruction * inst = emit_data->inst;
const struct tgsi_shader_info *info = &ctx->shader->selector->info;
char intrinsic_name[64];
- bool readonly_memory = false;
+ bool can_speculate = false;
if (inst->Src[0].Register.File == TGSI_FILE_MEMORY) {
load_emit_memory(ctx, emit_data);
@@ -571,7 +571,7 @@ static void load_emit(
if (inst->Memory.Qualifier & TGSI_MEMORY_VOLATILE)
si_emit_waitcnt(ctx, VM_CNT);
- readonly_memory = !(inst->Memory.Qualifier & TGSI_MEMORY_VOLATILE) &&
+ can_speculate = !(inst->Memory.Qualifier & TGSI_MEMORY_VOLATILE) &&
is_oneway_access_only(inst, info,
info->shader_buffers_store |
info->shader_buffers_atomic,
@@ -579,7 +579,7 @@ static void load_emit(
info->images_atomic);
if (inst->Src[0].Register.File == TGSI_FILE_BUFFER) {
- load_emit_buffer(ctx, emit_data, readonly_memory);
+ load_emit_buffer(ctx, emit_data, can_speculate);
return;
}
@@ -588,7 +588,7 @@ static void load_emit(
lp_build_intrinsic(
builder, "llvm.amdgcn.buffer.load.format.v4f32", emit_data->dst_type,
emit_data->args, emit_data->arg_count,
- get_load_intr_attribs(readonly_memory));
+ get_load_intr_attribs(can_speculate));
} else {
ac_get_image_intr_name("llvm.amdgcn.image.load",
emit_data->dst_type, /* vdata */
@@ -600,7 +600,7 @@ static void load_emit(
lp_build_intrinsic(
builder, intrinsic_name, emit_data->dst_type,
emit_data->args, emit_data->arg_count,
- get_load_intr_attribs(readonly_memory));
+ get_load_intr_attribs(can_speculate));
}
}