diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-03-13 17:38:43 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-03-13 18:23:27 +0100 |
commit | 3996e493693d5aa048fed1c2fd6db4027cb47df4 (patch) | |
tree | 41ded656e7af8bb40b4772b696015c6e63513535 /src/gallium/drivers/r300/r300_state_inlines.h | |
parent | d5749fb6fc9b7bb3c8a8b1632eee6db28678b3ba (diff) | |
download | external_mesa3d-3996e493693d5aa048fed1c2fd6db4027cb47df4.zip external_mesa3d-3996e493693d5aa048fed1c2fd6db4027cb47df4.tar.gz external_mesa3d-3996e493693d5aa048fed1c2fd6db4027cb47df4.tar.bz2 |
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.h | 12 |
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 a32924e..8485d4f 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) |