[Mesa-dev] [PATCH v2 02/12] ac: fix glc parameter use for new LLVM 8 typed buffer intrinsics
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Mar 13 10:50:10 UTC 2019
ac_build_llvm8_tbuffer_load() expects a boolean for glc.
Fixes: 2cf5433b99f ("ac: use new LLVM 8 intrinsic when loading 16-bit values")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/common/ac_llvm_build.c | 4 ++--
src/amd/common/ac_llvm_build.h | 2 +-
src/amd/common/ac_nir_to_llvm.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 8960b5ad4ff..75cebf427ad 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -1376,7 +1376,7 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
LLVMValueRef voffset,
LLVMValueRef soffset,
LLVMValueRef immoffset,
- LLVMValueRef glc)
+ bool glc)
{
unsigned dfmt = V_008F0C_BUF_DATA_FORMAT_16;
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
@@ -1401,7 +1401,7 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
immoffset,
LLVMConstInt(ctx->i32, dfmt, false),
LLVMConstInt(ctx->i32, nfmt, false),
- glc,
+ LLVMConstInt(ctx->i32, glc, false),
ctx->i1false,
};
res = ac_build_intrinsic(ctx, name, type, params, 9, 0);
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index fd5c4295abf..0fb3eb52f05 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -304,7 +304,7 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
LLVMValueRef voffset,
LLVMValueRef soffset,
LLVMValueRef immoffset,
- LLVMValueRef glc);
+ bool glc);
LLVMValueRef
ac_build_llvm8_tbuffer_load(struct ac_llvm_context *ctx,
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 5fb5c8da609..a7b3fdf64aa 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1716,7 +1716,7 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
offset,
ctx->ac.i32_0,
immoffset,
- glc);
+ cache_policy & ac_glc);
} else {
const char *load_name;
LLVMTypeRef data_type;
@@ -1787,7 +1787,7 @@ static LLVMValueRef visit_load_ubo_buffer(struct ac_nir_context *ctx,
offset,
ctx->ac.i32_0,
LLVMConstInt(ctx->ac.i32, 2 * i, 0),
- ctx->ac.i1false);
+ false);
}
ret = ac_build_gather_values(&ctx->ac, results, num_components);
} else {
--
2.21.0
More information about the mesa-dev
mailing list