gallivm: added field for sampler lod
authorBrian Paul <brianp@vmware.com>
Fri, 5 Mar 2010 23:07:26 +0000 (16:07 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 5 Mar 2010 23:32:09 +0000 (16:32 -0700)
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.h

index 55ac2e94363053ee52a48d32fae3d58bae7ed3d5..6a026e468e1d01e875feee080924fd7f81203d4c 100644 (file)
@@ -75,14 +75,15 @@ lp_sampler_static_state(struct lp_sampler_static_state *state,
    state->min_mip_filter    = sampler->min_mip_filter;
    state->mag_img_filter    = sampler->mag_img_filter;
    state->compare_mode      = sampler->compare_mode;
+   state->compare_func      = sampler->compare_func;
+   state->normalized_coords = sampler->normalized_coords;
+   state->lod_bias          = sampler->lod_bias;
+   state->min_lod           = sampler->min_lod;
+   state->max_lod           = sampler->max_lod;
    state->border_color[0]   = sampler->border_color[0];
    state->border_color[1]   = sampler->border_color[1];
    state->border_color[2]   = sampler->border_color[2];
    state->border_color[3]   = sampler->border_color[3];
-   if(sampler->compare_mode != PIPE_TEX_COMPARE_NONE) {
-      state->compare_func      = sampler->compare_func;
-   }
-   state->normalized_coords = sampler->normalized_coords;
 }
 
 
index a791d8861278eccf8dada653c801f176d4637655..2120775d1086861e88aa73f684fdcf3f79370e0a 100644 (file)
@@ -70,6 +70,7 @@ struct lp_sampler_static_state
    unsigned compare_mode:1;
    unsigned compare_func:3;
    unsigned normalized_coords:1;
+   float lod_bias, min_lod, max_lod;
    float border_color[4];
 };