iris: Don't enable smooth points when point sprites are enabled
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_sample.h
index a6f0eff42f684c7f05218a0fea4327293e7dd694..c00997b898308db9722048b2690ee21f784aa7b2 100644 (file)
@@ -42,6 +42,9 @@
 #include "gallivm/lp_bld_type.h"
 #include "gallivm/lp_bld_swizzle.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 struct pipe_resource;
 struct pipe_sampler_view;
@@ -79,7 +82,8 @@ enum lp_sampler_lod_control {
 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
 };
 
 
@@ -107,7 +111,17 @@ struct lp_sampler_params
    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.
  *
@@ -152,6 +166,7 @@ struct lp_static_sampler_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;
@@ -308,6 +323,10 @@ struct lp_build_sample_context
    /** 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;
@@ -473,6 +492,7 @@ lp_sampler_static_texture_state(struct lp_static_texture_state *state,
 
 void
 lp_build_lod_selector(struct lp_build_sample_context *bld,
+                      boolean is_lodq,
                       unsigned texture_index,
                       unsigned sampler_index,
                       LLVMValueRef s,
@@ -483,6 +503,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
                       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);
@@ -603,14 +624,7 @@ void
 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, 
@@ -625,5 +639,8 @@ lp_build_minify(struct lp_build_context *bld,
                 LLVMValueRef level,
                 boolean lod_scalar);
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* LP_BLD_SAMPLE_H */