aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.h
diff options
context:
space:
mode:
authorDaniel Schürmann <[email protected]>2018-03-06 15:03:36 +0100
committerBas Nieuwenhuizen <[email protected]>2018-04-14 01:03:09 +0200
commitd5f7ebda3ec03c35ee3b496f96fb3269b1d4b946 (patch)
treeacd278049c3b83453cbea9635abbaf2e62abde04 /src/amd/common/ac_llvm_build.h
parentd19f20e7930ef9b3383611291b5f18e1e30ac3c1 (diff)
ac: add LLVM build functions for subgroup instrinsics
Co-authored-by: Connor Abbott <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.h')
-rw-r--r--src/amd/common/ac_llvm_build.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index 8b35028a314..c583240e14b 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -27,7 +27,7 @@
#include <stdbool.h>
#include <llvm-c/TargetMachine.h>
-
+#include "compiler/nir/nir.h"
#include "amd_family.h"
#ifdef __cplusplus
@@ -417,6 +417,34 @@ LLVMValueRef ac_unpack_param(struct ac_llvm_context *ctx, LLVMValueRef param,
void ac_apply_fmask_to_sample(struct ac_llvm_context *ac, LLVMValueRef fmask,
LLVMValueRef *addr, bool is_array_tex);
+LLVMValueRef
+ac_build_ds_swizzle(struct ac_llvm_context *ctx, LLVMValueRef src, unsigned mask);
+
+LLVMValueRef
+ac_build_readlane(struct ac_llvm_context *ctx, LLVMValueRef src, LLVMValueRef lane);
+
+LLVMValueRef
+ac_build_writelane(struct ac_llvm_context *ctx, LLVMValueRef src, LLVMValueRef value, LLVMValueRef lane);
+
+LLVMValueRef
+ac_build_mbcnt(struct ac_llvm_context *ctx, LLVMValueRef mask);
+
+LLVMValueRef
+ac_build_inclusive_scan(struct ac_llvm_context *ctx, LLVMValueRef src, nir_op op);
+
+LLVMValueRef
+ac_build_exclusive_scan(struct ac_llvm_context *ctx, LLVMValueRef src, nir_op op);
+
+LLVMValueRef
+ac_build_reduce(struct ac_llvm_context *ctx, LLVMValueRef src, nir_op op, unsigned cluster_size);
+
+LLVMValueRef
+ac_build_quad_swizzle(struct ac_llvm_context *ctx, LLVMValueRef src,
+ unsigned lane0, unsigned lane1, unsigned lane2, unsigned lane3);
+
+LLVMValueRef
+ac_build_shuffle(struct ac_llvm_context *ctx, LLVMValueRef src, LLVMValueRef index);
+
#ifdef __cplusplus
}
#endif