From ebe12d50064370e4ddec21a1e087b24295940319 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 12 Feb 2010 00:43:38 +0100 Subject: 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. --- src/gallium/drivers/i915/i915_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/i915') diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 14a9314dab..62169918e2 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; } -- cgit v1.2.3