summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-10-26 14:43:51 +1000
committerDave Airlie <[email protected]>2017-10-26 15:59:11 +1000
commitf925f5b074b2ed22c44cc715aaacc554df904317 (patch)
tree318fc9f91d9a7b6fc8800cd7d967bad36e4dc274 /src/amd/common/ac_llvm_build.h
parent74fc9e9186389df1d94d82e919b5ae1576d7d68a (diff)
ac/nir: move lds declaration/load/store into shared code.
This was duplicated between both drivers, share here. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.h')
-rw-r--r--src/amd/common/ac_llvm_build.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index 996f55862ba..7d57b8bd767 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -34,6 +34,10 @@
extern "C" {
#endif
+enum {
+ AC_LOCAL_ADDR_SPACE = 3,
+};
+
struct ac_llvm_context {
LLVMContextRef context;
LLVMModuleRef module;
@@ -65,6 +69,8 @@ struct ac_llvm_context {
LLVMValueRef empty_md;
enum chip_class chip_class;
+
+ LLVMValueRef lds;
};
void
@@ -283,6 +289,12 @@ void ac_optimize_vs_outputs(struct ac_llvm_context *ac,
uint32_t num_outputs,
uint8_t *num_param_exports);
void ac_init_exec_full_mask(struct ac_llvm_context *ctx);
+
+void ac_declare_lds_as_pointer(struct ac_llvm_context *ac);
+LLVMValueRef ac_lds_load(struct ac_llvm_context *ctx,
+ LLVMValueRef dw_addr);
+void ac_lds_store(struct ac_llvm_context *ctx,
+ LLVMValueRef dw_addr, LLVMValueRef value);
#ifdef __cplusplus
}
#endif