summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-02-12 00:43:38 +0100
committerRoland Scheidegger <sroland@vmware.com>2010-02-12 00:43:38 +0100
commitebe12d50064370e4ddec21a1e087b24295940319 (patch)
treed686eb379bbb2b6bae32888be1215b74f32b692e /src/mesa/state_tracker
parent16d520f6d69edb112887d8db1e014a521a34f532 (diff)
gallium: make max_anisotropy a unsigned bitfield member
saves us a dword in sampler state, hw can't do non-integer aniso degree anyway. To allow aniso 1x (which seems of dubious value but some hardware (radeons) have such a mode, and even d3d allows specifiying it) redefine anisotropic filtering as disabled only if max_anistropy is 0.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 9d63f1c6ab..a8262a5e1a 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -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) {