aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-04-07 15:34:45 +0200
committerMarek Olšák <[email protected]>2016-04-12 14:29:48 +0200
commit1a98be001f06ae2d50d444d1103cc15b67502a14 (patch)
tree54dd0ed426b4563c670f3fcd9d3867655038b90f
parent2d7be5d37e70d19df88be53222bf02def40e93e6 (diff)
gallium/radeon: fix maximum texture anisotropy setup
We were overdoing it for non-power-of-two values. Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index cb8a34bf4ec..85c4ec0d6e6 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -644,11 +644,15 @@ static inline bool r600_get_strmout_en(struct r600_common_context *rctx)
static inline unsigned r600_tex_aniso_filter(unsigned filter)
{
- if (filter <= 1) return 0;
- if (filter <= 2) return 1;
- if (filter <= 4) return 2;
- if (filter <= 8) return 3;
- /* else */ return 4;
+ if (filter < 2)
+ return 0;
+ if (filter < 4)
+ return 1;
+ if (filter < 8)
+ return 2;
+ if (filter < 16)
+ return 3;
+ return 4;
}
static inline unsigned r600_wavefront_size(enum radeon_family family)