aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-09-30 15:36:18 +0200
committerMarek Olšák <[email protected]>2017-10-06 02:56:11 +0200
commitbcd3e761a3ddf42eee5b3c57b510fc2f2ee54198 (patch)
tree06d13c6b103f70a4a1f3a4a6d55de7a6a4554e96 /src/amd
parentcceb916456075cd79bf54833e80cd79d47d3c90b (diff)
ac: properly document a buffer.store LLVM workaround
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_llvm_build.c13
-rw-r--r--src/amd/common/ac_llvm_build.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index 46153a0c39c..1d97b09cd4f 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -760,10 +760,13 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
bool glc,
bool slc,
bool writeonly_memory,
- bool has_add_tid)
+ bool swizzle_enable_hint)
{
- /* TODO: Fix stores with ADD_TID and remove the "has_add_tid" flag. */
- if (!has_add_tid) {
+ /* SWIZZLE_ENABLE requires that soffset isn't folded into voffset
+ * (voffset is swizzled, but soffset isn't swizzled).
+ * llvm.amdgcn.buffer.store doesn't have a separate soffset parameter.
+ */
+ if (!swizzle_enable_hint) {
/* Split 3 channel stores, becase LLVM doesn't support 3-channel
* intrinsics. */
if (num_channels == 3) {
@@ -777,11 +780,11 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
ac_build_buffer_store_dword(ctx, rsrc, v01, 2, voffset,
soffset, inst_offset, glc, slc,
- writeonly_memory, has_add_tid);
+ writeonly_memory, swizzle_enable_hint);
ac_build_buffer_store_dword(ctx, rsrc, v[2], 1, voffset,
soffset, inst_offset + 8,
glc, slc,
- writeonly_memory, has_add_tid);
+ writeonly_memory, swizzle_enable_hint);
return;
}
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index 1d6dc0ab2f5..ac8ea9c4152 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -170,7 +170,7 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
bool glc,
bool slc,
bool writeonly_memory,
- bool has_add_tid);
+ bool swizzle_enable_hint);
LLVMValueRef
ac_build_buffer_load(struct ac_llvm_context *ctx,
LLVMValueRef rsrc,