gallium: add some temporary code for testing draw module vertex passthrough
[mesa.git] / src / mesa / state_tracker / st_atom_sampler.c
index 1babba9b4fa411cb1dbdfd4e4f6e317f6b5f4614..5787a7492c6bbcbce2e5695b601ede727d68d683 100644 (file)
@@ -160,6 +160,10 @@ update_samplers(struct st_context *st)
 #endif
 
         sampler->max_anisotropy = texobj->MaxAnisotropy;
+         if (sampler->max_anisotropy > 1.0) {
+            sampler->min_img_filter = PIPE_TEX_FILTER_ANISO;
+            sampler->mag_img_filter = PIPE_TEX_FILTER_ANISO;
+         }
 
          /* only care about ARB_shadow, not SGI shadow */
          if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
@@ -172,9 +176,12 @@ update_samplers(struct st_context *st)
          st->state.num_samplers = su + 1;
 
          /* XXX more sampler state here */
-      }
 
-      cso_single_sampler(st->cso_context, su, sampler);
+         cso_single_sampler(st->cso_context, su, sampler);
+      }
+      else {
+         cso_single_sampler(st->cso_context, su, NULL);
+      }
    }
 
    cso_single_sampler_done(st->cso_context);