summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_util.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-02 09:13:44 +1000
committerDave Airlie <[email protected]>2017-02-03 09:54:04 +1000
commitb3c28942c78864fe1259d653271723b51bd9311a (patch)
tree90f7b3f84ea90cf200a6a2d55714302b84c586cd /src/amd/common/ac_llvm_util.h
parenta9773311f6a1b7f49dbd207c12e8081a5823c5a9 (diff)
radeonsi/ac: move tbuffer store and buffer load to shared code.
These are all reuseable by radv. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_util.h')
-rw-r--r--src/amd/common/ac_llvm_util.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h
index c2193d1347d..7b08a269fcb 100644
--- a/src/amd/common/ac_llvm_util.h
+++ b/src/amd/common/ac_llvm_util.h
@@ -49,9 +49,15 @@ struct ac_llvm_context {
LLVMModuleRef module;
LLVMBuilderRef builder;
+ LLVMTypeRef voidt;
+ LLVMTypeRef i1;
+ LLVMTypeRef i8;
LLVMTypeRef i32;
LLVMTypeRef f32;
-
+ LLVMTypeRef v4i32;
+ LLVMTypeRef v4f32;
+ LLVMTypeRef v16i8;
+
unsigned invariant_load_md_kind;
unsigned uniform_md_kind;
unsigned fpmath_md_kind;
@@ -134,6 +140,42 @@ ac_build_indexed_load(struct ac_llvm_context *ctx,
LLVMValueRef
ac_build_indexed_load_const(struct ac_llvm_context *ctx,
LLVMValueRef base_ptr, LLVMValueRef index);
+
+void
+ac_build_tbuffer_store_dwords(struct ac_llvm_context *ctx,
+ LLVMValueRef rsrc,
+ LLVMValueRef vdata,
+ unsigned num_channels,
+ LLVMValueRef vaddr,
+ LLVMValueRef soffset,
+ unsigned inst_offset);
+
+void
+ac_build_tbuffer_store(struct ac_llvm_context *ctx,
+ LLVMValueRef rsrc,
+ LLVMValueRef vdata,
+ unsigned num_channels,
+ LLVMValueRef vaddr,
+ LLVMValueRef soffset,
+ unsigned inst_offset,
+ unsigned dfmt,
+ unsigned nfmt,
+ unsigned offen,
+ unsigned idxen,
+ unsigned glc,
+ unsigned slc,
+ unsigned tfe);
+
+LLVMValueRef
+ac_build_buffer_load(struct ac_llvm_context *ctx,
+ LLVMValueRef rsrc,
+ int num_channels,
+ LLVMValueRef vindex,
+ LLVMValueRef voffset,
+ LLVMValueRef soffset,
+ unsigned inst_offset,
+ unsigned glc,
+ unsigned slc);
#ifdef __cplusplus
}
#endif