+
+#define LP_IMG_LOAD 0
+#define LP_IMG_STORE 1
+#define LP_IMG_ATOMIC 2
+#define LP_IMG_ATOMIC_CAS 3
+
+struct lp_img_params
+{
+ struct lp_type type;
+ unsigned image_index;
+ unsigned img_op;
+ unsigned target;
+ LLVMAtomicRMWBinOp op;
+ LLVMValueRef exec_mask;
+ LLVMValueRef context_ptr;
+ LLVMValueRef thread_data_ptr;
+ const LLVMValueRef *coords;
+ LLVMValueRef indata[4];
+ LLVMValueRef indata2[4];
+ LLVMValueRef *outdata;
+};