diff options
author | Roland Scheidegger <[email protected]> | 2010-02-12 00:43:38 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-02-12 00:43:38 +0100 |
commit | ebe12d50064370e4ddec21a1e087b24295940319 (patch) | |
tree | d686eb379bbb2b6bae32888be1215b74f32b692e /src/gallium/drivers/i915 | |
parent | 16d520f6d69edb112887d8db1e014a521a34f532 (diff) |
gallium: make max_anisotropy a unsigned bitfield member
saves us a dword in sampler state, hw can't do non-integer aniso degree anyway.
To allow aniso 1x (which seems of dubious value but some hardware (radeons)
have such a mode, and even d3d allows specifiying it) redefine anisotropic
filtering as disabled only if max_anistropy is 0.
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 14a9314dab3..62169918e2b 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -228,10 +228,10 @@ i915_create_sampler_state(struct pipe_context *pipe, minFilt = translate_img_filter( sampler->min_img_filter ); magFilt = translate_img_filter( sampler->mag_img_filter ); - if (sampler->max_anisotropy > 1.0) + if (sampler->max_anisotropy > 1) minFilt = magFilt = FILTER_ANISOTROPIC; - if (sampler->max_anisotropy > 2.0) { + if (sampler->max_anisotropy > 2) { cso->state[0] |= SS2_MAX_ANISO_4; } |