struct tgsi_shader_info;
struct lp_build_mask_context;
struct gallivm_state;
+struct lp_derivatives;
enum lp_build_tex_modifier {
const struct lp_tgsi_channel_info *cbuf[PIPE_MAX_COLOR_BUFS];
};
+/**
+ * Reference to system values.
+ */
+struct lp_bld_tgsi_system_values {
+ LLVMValueRef instance_id;
+ LLVMValueRef vertex_id;
+};
+
+
/**
* Sampler code generation interface.
*
unsigned unit,
unsigned num_coords,
const LLVMValueRef *coords,
- const LLVMValueRef *ddx,
- const LLVMValueRef *ddy,
+ const struct lp_derivatives *derivs,
LLVMValueRef lod_bias, /* optional */
LLVMValueRef explicit_lod, /* optional */
LLVMValueRef *texel);
+
+ void
+ (*emit_size_query)( const struct lp_build_sampler_soa *sampler,
+ struct gallivm_state *gallivm,
+ struct lp_type type,
+ unsigned unit,
+ LLVMValueRef explicit_lod, /* optional */
+ LLVMValueRef *sizes_out);
};
unsigned target, /* TGSI_TEXTURE_* */
unsigned unit,
LLVMValueRef coords,
- LLVMValueRef ddx,
- LLVMValueRef ddy,
+ const struct lp_derivatives derivs,
enum lp_build_tex_modifier modifier);
};
struct lp_type type,
struct lp_build_mask_context *mask,
LLVMValueRef consts_ptr,
- LLVMValueRef system_values_array,
+ const struct lp_bld_tgsi_system_values *system_values,
const LLVMValueRef *pos,
const LLVMValueRef (*inputs)[4],
LLVMValueRef (*outputs)[4],
const struct tgsi_shader_info *info);
-LLVMValueRef
-lp_build_system_values_array(struct gallivm_state *gallivm,
- const struct tgsi_shader_info *info,
- LLVMValueRef instance_id,
- LLVMValueRef facing);
-
-
struct lp_exec_mask {
struct lp_build_context *bld;
*/
LLVMValueRef inputs_array;
- LLVMValueRef system_values_array;
+ struct lp_bld_tgsi_system_values system_values;
/** bitmask indicating which register files are accessed indirectly */
unsigned indirect_files;