summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-06-09 03:36:37 +0200
committerMarek Olšák <[email protected]>2011-06-09 04:19:03 +0200
commit466ce95ddff734d5090bcb1c5ada7a4f23e13226 (patch)
tree370545fc9f716b9eeb7506d20f11f4847bad9f9c /src/gallium/drivers/r300
parent04554c7d3a3b28e8103e50ed54f1ac57c6c11017 (diff)
r300g: don't enable aniso with nearest filtering
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h80
1 files changed, 39 insertions, 41 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 54dae1acd98..62c03b3909b 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -261,51 +261,49 @@ static INLINE uint32_t r300_translate_wrap(int wrap)
}
static INLINE uint32_t r300_translate_tex_filters(int min, int mag, int mip,
- int is_anisotropic)
+ boolean is_anisotropic)
{
uint32_t retval = 0;
- if (is_anisotropic)
- retval |= R300_TX_MIN_FILTER_ANISO | R300_TX_MAG_FILTER_ANISO;
- else {
- switch (min) {
- case PIPE_TEX_FILTER_NEAREST:
- retval |= R300_TX_MIN_FILTER_NEAREST;
- break;
- case PIPE_TEX_FILTER_LINEAR:
- retval |= R300_TX_MIN_FILTER_LINEAR;
- break;
- default:
- fprintf(stderr, "r300: Unknown texture filter %d\n", min);
- assert(0);
- break;
- }
- switch (mag) {
- case PIPE_TEX_FILTER_NEAREST:
- retval |= R300_TX_MAG_FILTER_NEAREST;
- break;
- case PIPE_TEX_FILTER_LINEAR:
- retval |= R300_TX_MAG_FILTER_LINEAR;
- break;
- default:
- fprintf(stderr, "r300: Unknown texture filter %d\n", mag);
- assert(0);
- break;
- }
+
+ switch (min) {
+ case PIPE_TEX_FILTER_NEAREST:
+ retval |= R300_TX_MIN_FILTER_NEAREST;
+ break;
+ case PIPE_TEX_FILTER_LINEAR:
+ retval |= is_anisotropic ? R300_TX_MIN_FILTER_ANISO :
+ R300_TX_MIN_FILTER_LINEAR;
+ break;
+ default:
+ fprintf(stderr, "r300: Unknown texture filter %d\n", min);
+ assert(0);
}
+
+ switch (mag) {
+ case PIPE_TEX_FILTER_NEAREST:
+ retval |= R300_TX_MAG_FILTER_NEAREST;
+ break;
+ case PIPE_TEX_FILTER_LINEAR:
+ retval |= is_anisotropic ? R300_TX_MAG_FILTER_ANISO :
+ R300_TX_MAG_FILTER_LINEAR;
+ break;
+ default:
+ fprintf(stderr, "r300: Unknown texture filter %d\n", mag);
+ assert(0);
+ }
+
switch (mip) {
- case PIPE_TEX_MIPFILTER_NONE:
- retval |= R300_TX_MIN_FILTER_MIP_NONE;
- break;
- case PIPE_TEX_MIPFILTER_NEAREST:
- retval |= R300_TX_MIN_FILTER_MIP_NEAREST;
- break;
- case PIPE_TEX_MIPFILTER_LINEAR:
- retval |= R300_TX_MIN_FILTER_MIP_LINEAR;
- break;
- default:
- fprintf(stderr, "r300: Unknown texture filter %d\n", mip);
- assert(0);
- break;
+ case PIPE_TEX_MIPFILTER_NONE:
+ retval |= R300_TX_MIN_FILTER_MIP_NONE;
+ break;
+ case PIPE_TEX_MIPFILTER_NEAREST:
+ retval |= R300_TX_MIN_FILTER_MIP_NEAREST;
+ break;
+ case PIPE_TEX_MIPFILTER_LINEAR:
+ retval |= R300_TX_MIN_FILTER_MIP_LINEAR;
+ break;
+ default:
+ fprintf(stderr, "r300: Unknown texture filter %d\n", mip);
+ assert(0);
}
return retval;