summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texcombine.c
diff options
context:
space:
mode:
authorAndreas Faenger <[email protected]>2011-05-18 08:14:33 -0600
committerBrian Paul <[email protected]>2011-05-18 08:14:33 -0600
commit8a98aabe0bcea42cfdc982001ae4876e3d9b1214 (patch)
tree2802b7b6975dac6f42243ee7ad01476cd9ebbb87 /src/mesa/swrast/s_texcombine.c
parent707eadcb7f603e803978a541a16e9893663c33e2 (diff)
swrast: anisotropic filtering extension
Anisotropic filtering extension for swrast intended to be used by osmesa to create high quality renderings. Based on Higher Quality Elliptical Weighted Avarage Filter (EWA). A 2nd implementation using footprint assembly is also provided. Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_texcombine.c')
-rw-r--r--src/mesa/swrast/s_texcombine.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 7f49b6ffa50..086ed0b33d7 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -710,6 +710,18 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
}
}
}
+ else if (curObj->Sampler.MaxAnisotropy > 1.0 &&
+ curObj->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) {
+ /* sample_lambda_2d_aniso is beeing used as texture_sample_func,
+ * it requires the current SWspan *span as an additional parameter.
+ * In order to keep the same function signature, the unused lambda
+ * parameter will be modified to actually contain the SWspan pointer.
+ * This is a Hack. To make it right, the texture_sample_func
+ * signature and all implementing functions need to be modified.
+ */
+ /* "hide" SWspan struct; cast to (GLfloat *) to suppress warning */
+ lambda = (GLfloat *)span;
+ }
/* Sample the texture (span->end = number of fragments) */
swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end,