mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-14 11:28:19 +02:00
radeonsi: fix LLVM 3.9 - don't use non-matching attributes on declarations
Call site attributes are used since LLVM 4.0.
This also reverts commit b19caecbd6
"radeon/ac: fix intrinsic version check", because this is the correct fix.
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6398a09213
commit
9b08f044be
2 changed files with 7 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue