+enum lp_sampler_lod_control {
+ LP_SAMPLER_LOD_IMPLICIT,
+ LP_SAMPLER_LOD_BIAS,
+ LP_SAMPLER_LOD_EXPLICIT,
+ LP_SAMPLER_LOD_DERIVATIVES,
+};
+
+
+enum lp_sampler_op_type {
+ LP_SAMPLER_OP_TEXTURE,
+ LP_SAMPLER_OP_FETCH,
+ LP_SAMPLER_OP_GATHER,
+ LP_SAMPLER_OP_LODQ
+};
+
+
+#define LP_SAMPLER_SHADOW (1 << 0)
+#define LP_SAMPLER_OFFSETS (1 << 1)
+#define LP_SAMPLER_OP_TYPE_SHIFT 2
+#define LP_SAMPLER_OP_TYPE_MASK (3 << 2)
+#define LP_SAMPLER_LOD_CONTROL_SHIFT 4
+#define LP_SAMPLER_LOD_CONTROL_MASK (3 << 4)
+#define LP_SAMPLER_LOD_PROPERTY_SHIFT 6
+#define LP_SAMPLER_LOD_PROPERTY_MASK (3 << 6)
+#define LP_SAMPLER_GATHER_COMP_SHIFT 8
+#define LP_SAMPLER_GATHER_COMP_MASK (3 << 8)
+#define LP_SAMPLER_FETCH_MS (1 << 10)
+
+struct lp_sampler_params
+{
+ struct lp_type type;
+ unsigned texture_index;
+ unsigned sampler_index;
+ LLVMValueRef texture_index_offset;
+ unsigned sample_key;
+ LLVMValueRef context_ptr;
+ LLVMValueRef thread_data_ptr;
+ const LLVMValueRef *coords;
+ const LLVMValueRef *offsets;
+ LLVMValueRef ms_index;
+ LLVMValueRef lod;
+ const struct lp_derivatives *derivs;
+ LLVMValueRef *texel;
+};
+
+struct lp_sampler_size_query_params
+{
+ struct lp_type int_type;
+ unsigned texture_unit;
+ LLVMValueRef texture_unit_offset;
+ unsigned target;
+ LLVMValueRef context_ptr;
+ boolean is_sviewinfo;
+ bool samples_only;
+ enum lp_sampler_lod_property lod_property;
+ LLVMValueRef explicit_lod;
+ LLVMValueRef *sizes_out;
+};
+
+#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;
+ LLVMValueRef image_index_offset;
+ unsigned img_op;
+ unsigned target;
+ LLVMAtomicRMWBinOp op;
+ LLVMValueRef exec_mask;
+ LLVMValueRef context_ptr;
+ LLVMValueRef thread_data_ptr;
+ const LLVMValueRef *coords;
+ LLVMValueRef ms_index;
+ LLVMValueRef indata[4];
+ LLVMValueRef indata2[4];
+ LLVMValueRef *outdata;
+};