diff options
author | Keith Whitwell <[email protected]> | 2008-03-12 10:39:25 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-03-12 10:42:49 +0000 |
commit | 98ae83d5cc73b61826823c915b5c59746c2e85c7 (patch) | |
tree | eb1913d0641329b9b4a8618227af34f354eb71a8 /src/mesa/state_tracker | |
parent | feb02084a88ca6e23c34fa06e963765c890f0b65 (diff) |
gallium: Add TEX_FILTER_ANISO img filter
Hardware almost universally expects us to set a special filtering mode
when anisotropic filtering is enabled, as opposed to varying a max-aniso
values. Do this once in the state tracker & simplify the driver code.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 1babba9b4fa..d376480c915 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -160,6 +160,10 @@ update_samplers(struct st_context *st) #endif sampler->max_anisotropy = texobj->MaxAnisotropy; + if (sampler->max_anisotropy > 1.0) { + sampler->min_img_filter = PIPE_TEX_FILTER_ANISO; + sampler->mag_img_filter = PIPE_TEX_FILTER_ANISO; + } /* only care about ARB_shadow, not SGI shadow */ if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) { |