summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_build.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-23 23:00:19 +0100
committerMarek Olšák <[email protected]>2017-03-03 15:29:30 +0100
commitad18d7f040431ac64c349c2a764fd94d4152e573 (patch)
tree80c447805e0fc3068dae9b7702c84e01c8acae0c /src/amd/common/ac_llvm_build.h
parent2b3ebe307c2250f3cc8ffea203e3a2196a70d496 (diff)
radeonsi: move image intrinsic building to amd/common
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.h')
-rw-r--r--src/amd/common/ac_llvm_build.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h
index 27f2097a1c6..f57acc20663 100644
--- a/src/amd/common/ac_llvm_build.h
+++ b/src/amd/common/ac_llvm_build.h
@@ -205,6 +205,35 @@ struct ac_export_args {
void ac_emit_export(struct ac_llvm_context *ctx, struct ac_export_args *a);
+enum ac_image_opcode {
+ ac_image_sample,
+ ac_image_gather4,
+ ac_image_load,
+ ac_image_load_mip,
+ ac_image_get_lod,
+ ac_image_get_resinfo,
+};
+
+struct ac_image_args {
+ enum ac_image_opcode opcode;
+ bool level_zero;
+ bool bias;
+ bool lod;
+ bool deriv;
+ bool compare;
+ bool offset;
+
+ LLVMValueRef resource;
+ LLVMValueRef sampler;
+ LLVMValueRef addr;
+ unsigned dmask;
+ bool unorm;
+ bool da;
+};
+
+LLVMValueRef ac_emit_image_opcode(struct ac_llvm_context *ctx,
+ struct ac_image_args *a);
+
#ifdef __cplusplus
}
#endif