summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_llvm_build.c6
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c6
2 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 acda5e26db7..20c6eb80560 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -693,7 +693,7 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
/* READNONE means writes can't
* affect it, while READONLY means
* that writes can affect it. */
- readonly_memory ?
+ readonly_memory && HAVE_LLVM >= 0x0400 ?
AC_FUNC_ATTR_READNONE :
AC_FUNC_ATTR_READONLY);
} else {
@@ -736,7 +736,7 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
LLVMValueRef voffset,
bool readonly_memory)
{
- if (HAVE_LLVM >= 0x0400) {
+ if (HAVE_LLVM >= 0x0309) {
LLVMValueRef args [] = {
LLVMBuildBitCast(ctx->builder, rsrc, ctx->v4i32, ""),
vindex,
@@ -751,7 +751,7 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx,
/* READNONE means writes can't
* affect it, while READONLY means
* that writes can affect it. */
- readonly_memory ?
+ readonly_memory && HAVE_LLVM >= 0x0400 ?
AC_FUNC_ATTR_READNONE :
AC_FUNC_ATTR_READONLY);
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 319c0c8cc87..4e133ecebf6 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3442,13 +3442,15 @@ static unsigned get_load_intr_attribs(bool readonly_memory)
{
/* READNONE means writes can't affect it, while READONLY means that
* writes can affect it. */
- return readonly_memory ? LP_FUNC_ATTR_READNONE :
+ return readonly_memory && HAVE_LLVM >= 0x0400 ?
+ LP_FUNC_ATTR_READNONE :
LP_FUNC_ATTR_READONLY;
}
static unsigned get_store_intr_attribs(bool writeonly_memory)
{
- return writeonly_memory ? LP_FUNC_ATTR_INACCESSIBLE_MEM_ONLY :
+ return writeonly_memory && HAVE_LLVM >= 0x0400 ?
+ LP_FUNC_ATTR_INACCESSIBLE_MEM_ONLY :
LP_FUNC_ATTR_WRITEONLY;
}