summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv40
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2010-02-12 00:43:38 +0100
committerRoland Scheidegger <[email protected]>2010-02-12 00:43:38 +0100
commitebe12d50064370e4ddec21a1e087b24295940319 (patch)
treed686eb379bbb2b6bae32888be1215b74f32b692e /src/gallium/drivers/nv40
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/gallium/drivers/nv40')
-rw-r--r--src/gallium/drivers/nv40/nv40_state.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/nv40/nv40_state.c b/src/gallium/drivers/nv40/nv40_state.c
index d068be6243a..2073bf07353 100644
--- a/src/gallium/drivers/nv40/nv40_state.c
+++ b/src/gallium/drivers/nv40/nv40_state.c
@@ -132,26 +132,26 @@ nv40_sampler_state_create(struct pipe_context *pipe,
(wrap_mode(cso->wrap_r) << NV40TCL_TEX_WRAP_R_SHIFT));
ps->en = 0;
- if (cso->max_anisotropy >= 2.0) {
+ if (cso->max_anisotropy >= 2) {
/* no idea, binary driver sets it, works without it.. meh.. */
ps->wrap |= (1 << 5);
- if (cso->max_anisotropy >= 16.0) {
+ if (cso->max_anisotropy >= 16) {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_16X;
} else
- if (cso->max_anisotropy >= 12.0) {
+ if (cso->max_anisotropy >= 12) {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_12X;
} else
- if (cso->max_anisotropy >= 10.0) {
+ if (cso->max_anisotropy >= 10) {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_10X;
} else
- if (cso->max_anisotropy >= 8.0) {
+ if (cso->max_anisotropy >= 8) {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_8X;
} else
- if (cso->max_anisotropy >= 6.0) {
+ if (cso->max_anisotropy >= 6) {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_6X;
} else
- if (cso->max_anisotropy >= 4.0) {
+ if (cso->max_anisotropy >= 4) {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_4X;
} else {
ps->en |= NV40TCL_TEX_ENABLE_ANISO_2X;