summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state_inlines.h
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-03-13 17:38:43 +0100
committerMarek Olšák <maraeo@gmail.com>2010-03-13 18:23:27 +0100
commit3996e493693d5aa048fed1c2fd6db4027cb47df4 (patch)
tree41ded656e7af8bb40b4772b696015c6e63513535 /src/gallium/drivers/r300/r300_state_inlines.h
parentd5749fb6fc9b7bb3c8a8b1632eee6db28678b3ba (diff)
r300g: add high quality anisotropic filtering for R5xx (disabled by default)
Oh look, an undocumented feature. It's a nice tool for benchmarking texturing.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_inlines.h')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index a32924ed0a..8485d4f8f9 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -327,6 +327,18 @@ static INLINE uint32_t r300_anisotropy(unsigned max_aniso)
}
}
+static INLINE uint32_t r500_anisotropy(unsigned max_aniso)
+{
+ if (!max_aniso) {
+ return 0;
+ }
+ max_aniso -= 1;
+
+ // Map the range [0, 15] to [0, 63].
+ return R500_TX_MAX_ANISO(MIN2((unsigned)(max_aniso*4.2001), 63)) |
+ R500_TX_ANISO_HIGH_QUALITY;;
+}
+
/* Non-CSO state. (For now.) */
static INLINE uint32_t r300_translate_gb_pipes(int pipe_count)