Module: Mesa
Branch: master
Commit: b219b2c310911286f375d6b9967d5fd39ec1188a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b219b2c310911286f375d6b9967d5fd39ec1188a

Author: Brian Paul <[email protected]>
Date:   Sat Mar 17 16:30:03 2012 -0600

mesa: add _mesa_is_mipmap_filter() helper

Reviewed-by: José Fonseca <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>

---

 src/mesa/main/samplerobj.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h
index c22d025..0bfda43 100644
--- a/src/mesa/main/samplerobj.h
+++ b/src/mesa/main/samplerobj.h
@@ -37,6 +37,15 @@ _mesa_get_samplerobj(struct gl_context *ctx, GLuint unit)
       return &ctx->Texture.Unit[unit]._Current->Sampler;
 }
 
+
+/** Does the given filter state do mipmap filtering? */
+static inline GLboolean
+_mesa_is_mipmap_filter(const struct gl_sampler_object *samp)
+{
+   return samp->MinFilter != GL_NEAREST && samp->MinFilter != GL_LINEAR;
+}
+
+
 extern void
 _mesa_reference_sampler_object_(struct gl_context *ctx,
                                 struct gl_sampler_object **ptr,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to