aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-03-13 14:04:14 +0100
committerSamuel Pitoiset <[email protected]>2019-03-13 14:16:14 +0100
commitcbf022cb316f1224f9afcc12ca414fc2d7d778a8 (patch)
treef3f73dfb80522fb8937e270fd88b44bff010a947 /src
parent045fae0f734a39cd24e444ac05382545dc7fdd2e (diff)
ac: use the raw tbuffer version for 16-bit SSBO loads
vindex is always 0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_llvm_build.c6
-rw-r--r--src/amd/common/ac_llvm_build.h1
-rw-r--r--src/amd/common/ac_nir_to_llvm.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 2d873d79102..0cab4d4a9b5 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -1494,7 +1494,6 @@ ac_build_raw_tbuffer_load(struct ac_llvm_context *ctx,
LLVMValueRef
ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
LLVMValueRef rsrc,
- LLVMValueRef vindex,
LLVMValueRef voffset,
LLVMValueRef soffset,
LLVMValueRef immoffset,
@@ -1504,8 +1503,9 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
unsigned nfmt = V_008F0C_BUF_NUM_FORMAT_UINT;
LLVMValueRef res;
- res = ac_build_tbuffer_load(ctx, rsrc, vindex, voffset, soffset,
- immoffset, 1, dfmt, nfmt, glc, false, false, true);
+ res = ac_build_raw_tbuffer_load(ctx, rsrc, voffset, soffset,
+ immoffset, 1, dfmt, nfmt, glc, false,
+ false);
return LLVMBuildTrunc(ctx->builder, res, ctx->i16, "");
}
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index c6475320990..55068169a34 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -300,7 +300,6 @@ LLVMValueRef ac_build_buffer_load_format_gfx9_safe(struct ac_llvm_context *ctx,
LLVMValueRef
ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
LLVMValueRef rsrc,
- LLVMValueRef vindex,
LLVMValueRef voffset,
LLVMValueRef soffset,
LLVMValueRef immoffset,
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index a7b3fdf64aa..18297ed99b1 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -1712,7 +1712,6 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
if (load_bytes == 2) {
ret = ac_build_tbuffer_load_short(&ctx->ac,
rsrc,
- vindex,
offset,
ctx->ac.i32_0,
immoffset,
@@ -1783,7 +1782,6 @@ static LLVMValueRef visit_load_ubo_buffer(struct ac_nir_context *ctx,
for (unsigned i = 0; i < num_components; ++i) {
results[i] = ac_build_tbuffer_load_short(&ctx->ac,
rsrc,
- ctx->ac.i32_0,
offset,
ctx->ac.i32_0,
LLVMConstInt(ctx->ac.i32, 2 * i, 0),