Merge branch 'gallium-polygon-stipple'
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_sample.h
index ce2285446acfc359d8c53b5a6306524b8ac9b88b..a71e656fe0e95d3924f7de9d9b741af1717188b2 100644 (file)
@@ -105,64 +105,70 @@ struct lp_sampler_dynamic_state
    /** Obtain the base texture width (returns int32) */
    LLVMValueRef
    (*width)( const struct lp_sampler_dynamic_state *state,
-             LLVMBuilderRef builder,
+             struct gallivm_state *gallivm,
              unsigned unit);
 
    /** Obtain the base texture height (returns int32) */
    LLVMValueRef
    (*height)( const struct lp_sampler_dynamic_state *state,
-              LLVMBuilderRef builder,
+              struct gallivm_state *gallivm,
               unsigned unit);
 
    /** Obtain the base texture depth (returns int32) */
    LLVMValueRef
    (*depth)( const struct lp_sampler_dynamic_state *state,
-             LLVMBuilderRef builder,
+             struct gallivm_state *gallivm,
              unsigned unit);
 
+   /** Obtain the first mipmap level (base level) (returns int32) */
+   LLVMValueRef
+   (*first_level)( const struct lp_sampler_dynamic_state *state,
+                   struct gallivm_state *gallivm,
+                   unsigned unit);
+
    /** Obtain the number of mipmap levels minus one (returns int32) */
    LLVMValueRef
    (*last_level)( const struct lp_sampler_dynamic_state *state,
-                  LLVMBuilderRef builder,
+                  struct gallivm_state *gallivm,
                   unsigned unit);
 
    /** Obtain stride in bytes between image rows/blocks (returns int32) */
    LLVMValueRef
    (*row_stride)( const struct lp_sampler_dynamic_state *state,
-                  LLVMBuilderRef builder,
+                  struct gallivm_state *gallivm,
                   unsigned unit);
 
    /** Obtain stride in bytes between image slices (returns int32) */
    LLVMValueRef
    (*img_stride)( const struct lp_sampler_dynamic_state *state,
-                  LLVMBuilderRef builder,
+                  struct gallivm_state *gallivm,
                   unsigned unit);
 
    /** Obtain pointer to array of pointers to mimpap levels */
    LLVMValueRef
    (*data_ptr)( const struct lp_sampler_dynamic_state *state,
-                LLVMBuilderRef builder,
+                struct gallivm_state *gallivm,
                 unsigned unit);
 
    /** Obtain texture min lod (returns float) */
    LLVMValueRef
    (*min_lod)(const struct lp_sampler_dynamic_state *state,
-              LLVMBuilderRef builder, unsigned unit);
+              struct gallivm_state *gallivm, unsigned unit);
 
    /** Obtain texture max lod (returns float) */
    LLVMValueRef
    (*max_lod)(const struct lp_sampler_dynamic_state *state,
-              LLVMBuilderRef builder, unsigned unit);
+              struct gallivm_state *gallivm, unsigned unit);
 
    /** Obtain texture lod bias (returns float) */
    LLVMValueRef
    (*lod_bias)(const struct lp_sampler_dynamic_state *state,
-               LLVMBuilderRef builder, unsigned unit);
+               struct gallivm_state *gallivm, unsigned unit);
 
    /** Obtain texture border color (returns ptr to float[4]) */
    LLVMValueRef
    (*border_color)(const struct lp_sampler_dynamic_state *state,
-                   LLVMBuilderRef builder, unsigned unit);
+                   struct gallivm_state *gallivm, unsigned unit);
 };
 
 
@@ -171,7 +177,7 @@ struct lp_sampler_dynamic_state
  */
 struct lp_build_sample_context
 {
-   LLVMBuilderRef builder;
+   struct gallivm_state *gallivm;
 
    const struct lp_sampler_static_state *static_state;
 
@@ -197,10 +203,6 @@ struct lp_build_sample_context
    struct lp_type coord_type;
    struct lp_build_context coord_bld;
 
-   /** Unsigned integer coordinates */
-   struct lp_type uint_coord_type;
-   struct lp_build_context uint_coord_bld;
-
    /** Signed integer coordinates */
    struct lp_type int_coord_type;
    struct lp_build_context int_coord_bld;
@@ -389,7 +391,7 @@ lp_build_sample_offset(struct lp_build_context *bld,
 
 
 void
-lp_build_sample_soa(LLVMBuilderRef builder,
+lp_build_sample_soa(struct gallivm_state *gallivm,
                     const struct lp_sampler_static_state *static_state,
                     struct lp_sampler_dynamic_state *dynamic_state,
                     struct lp_type fp_type,
@@ -403,7 +405,7 @@ lp_build_sample_soa(LLVMBuilderRef builder,
                     LLVMValueRef texel_out[4]);
 
 void
-lp_build_sample_nop(struct lp_type type,
+lp_build_sample_nop(struct gallivm_state *gallivm, struct lp_type type,
                     LLVMValueRef texel_out[4]);