summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_state.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2009-01-13 10:55:06 +1000
committerBen Skeggs <[email protected]>2009-01-13 13:57:22 +1000
commitf7c2010525a3fb37079c2cff51d4c593ef8e807b (patch)
treeaa675820f46926d7a961f3a8d265973c8029bd32 /src/gallium/drivers/nv50/nv50_state.c
parent918fc55e5f5cbedd3ab8fb3e02b225106c059fa6 (diff)
nv50: aniso
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_state.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 95f9d408b5e..cabe54bde3a 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -175,6 +175,27 @@ nv50_sampler_state_create(struct pipe_context *pipe,
break;
}
+ if (cso->max_anisotropy >= 16.0)
+ tsc[0] |= (7 << 20);
+ else
+ if (cso->max_anisotropy >= 12.0)
+ tsc[0] |= (6 << 20);
+ else
+ if (cso->max_anisotropy >= 10.0)
+ tsc[0] |= (5 << 20);
+ else
+ if (cso->max_anisotropy >= 8.0)
+ tsc[0] |= (4 << 20);
+ else
+ if (cso->max_anisotropy >= 6.0)
+ tsc[0] |= (3 << 20);
+ else
+ if (cso->max_anisotropy >= 4.0)
+ tsc[0] |= (2 << 20);
+ else
+ if (cso->max_anisotropy >= 2.0)
+ tsc[0] |= (1 << 20);
+
return (void *)tsc;
}