#include "gallivm/lp_bld_type.h"
#include "gallivm/lp_bld_swizzle.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
struct pipe_resource;
struct pipe_sampler_view;
enum lp_sampler_op_type {
LP_SAMPLER_OP_TEXTURE,
LP_SAMPLER_OP_FETCH,
- LP_SAMPLER_OP_GATHER
+ LP_SAMPLER_OP_GATHER,
+ LP_SAMPLER_OP_LODQ
};
LLVMValueRef *texel;
};
-
+struct lp_sampler_size_query_params
+{
+ struct lp_type int_type;
+ unsigned texture_unit;
+ unsigned target;
+ LLVMValueRef context_ptr;
+ boolean is_sviewinfo;
+ enum lp_sampler_lod_property lod_property;
+ LLVMValueRef explicit_lod;
+ LLVMValueRef *sizes_out;
+};
/**
* Texture static state.
*
unsigned normalized_coords:1;
unsigned min_max_lod_equal:1; /**< min_lod == max_lod ? */
unsigned lod_bias_non_zero:1;
+ unsigned max_lod_pos:1;
unsigned apply_min_lod:1; /**< min_lod > 0 ? */
unsigned apply_max_lod:1; /**< max_lod < last_level ? */
unsigned seamless_cube_map:1;
/** number of lod values (valid are 1, length/4, length) */
unsigned num_lods;
+ boolean no_quad_lod;
+ boolean no_brilinear;
+ boolean no_rho_approx;
+
/** regular scalar float type */
struct lp_type float_type;
struct lp_build_context float_bld;
void
lp_build_lod_selector(struct lp_build_sample_context *bld,
+ boolean is_lodq,
unsigned texture_index,
unsigned sampler_index,
LLVMValueRef s,
LLVMValueRef lod_bias, /* optional */
LLVMValueRef explicit_lod, /* optional */
unsigned mip_filter,
+ LLVMValueRef *out_lod,
LLVMValueRef *out_lod_ipart,
LLVMValueRef *out_lod_fpart,
LLVMValueRef *out_lod_positive);
lp_build_size_query_soa(struct gallivm_state *gallivm,
const struct lp_static_texture_state *static_state,
struct lp_sampler_dynamic_state *dynamic_state,
- struct lp_type int_type,
- unsigned texture_unit,
- unsigned target,
- LLVMValueRef context_ptr,
- boolean is_sviewinfo,
- enum lp_sampler_lod_property lod_property,
- LLVMValueRef explicit_lod,
- LLVMValueRef *sizes_out);
+ const struct lp_sampler_size_query_params *params);
void
lp_build_sample_nop(struct gallivm_state *gallivm,
LLVMValueRef level,
boolean lod_scalar);
+#ifdef __cplusplus
+}
+#endif
#endif /* LP_BLD_SAMPLE_H */