summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30
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/nv30
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/nv30')
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 8fc6856ee5e..d911c807074 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -139,13 +139,13 @@ nv30_sampler_state_create(struct pipe_context *pipe,
ps->en = 0;
- if (cso->max_anisotropy >= 8.0) {
+ if (cso->max_anisotropy >= 8) {
ps->en |= NV34TCL_TX_ENABLE_ANISO_8X;
} else
- if (cso->max_anisotropy >= 4.0) {
+ if (cso->max_anisotropy >= 4) {
ps->en |= NV34TCL_TX_ENABLE_ANISO_4X;
} else
- if (cso->max_anisotropy >= 2.0) {
+ if (cso->max_anisotropy >= 2) {
ps->en |= NV34TCL_TX_ENABLE_ANISO_2X;
}