st/mesa: add prototype for st_bufferobj_validate_usage()
[mesa.git] / src / mesa / state_tracker / st_atom_sampler.c
index 7b84a86ba485d35762b8888cec48c776760c7b8b..a8262a5e1aa3c4639853b056cfc4256fe4d2a592 100644 (file)
@@ -37,7 +37,6 @@
 #include "st_context.h"
 #include "st_cb_texture.h"
 #include "st_atom.h"
-#include "st_program.h"
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 
@@ -212,7 +211,7 @@ update_samplers(struct st_context *st)
                             teximg ? teximg->_BaseFormat : GL_RGBA,
                             sampler->border_color);
 
-        sampler->max_anisotropy = texobj->MaxAnisotropy;
+        sampler->max_anisotropy = (texobj->MaxAnisotropy == 1.0 ? 0 : (GLuint)texobj->MaxAnisotropy);
 
          /* only care about ARB_shadow, not SGI shadow */
          if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) {