gallium: make max_anisotropy a unsigned bitfield member
[mesa.git] / src / mesa / state_tracker / st_atom_sampler.c
index 9d63f1c6ab6583b251e8d4d6514b0311477f3421..a8262a5e1aa3c4639853b056cfc4256fe4d2a592 100644 (file)
@@ -211,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) {