llvmpipe: Switch to PIPE_TEX_MIPFILTER_NONE when texture has no mipmaps.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 13 Mar 2010 19:11:08 +0000 (19:11 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 13 Mar 2010 19:11:33 +0000 (19:11 +0000)
src/gallium/auxiliary/gallivm/lp_bld_sample.c

index 543fd5fea3fd04419a21fa507bb3c88af0ca5534..2f74aa5e00a1f4d3fab3412f003d362b0721ed2f 100644 (file)
@@ -84,8 +84,12 @@ lp_sampler_static_state(struct lp_sampler_static_state *state,
    state->wrap_t            = sampler->wrap_t;
    state->wrap_r            = sampler->wrap_r;
    state->min_img_filter    = sampler->min_img_filter;
-   state->min_mip_filter    = sampler->min_mip_filter;
    state->mag_img_filter    = sampler->mag_img_filter;
+   if (texture->last_level) {
+      state->min_mip_filter = sampler->min_mip_filter;
+   } else {
+      state->min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
+   }
 
    state->compare_mode      = sampler->compare_mode;
    if (sampler->compare_mode != PIPE_TEX_COMPARE_NONE) {