Message info
 
To:mesa-dev@lists.freedesktop.org From:Brian Paul Subject:[Mesa-dev] [PATCH 11/13] mesa: add _mesa_is_mipmap_filter() helper Date:Sun, 18 Mar 2012 10:49:27 -0600
 

---
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,
--
1.7.3.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev