[Mesa-dev] [PATCH 11/13] mesa: add _mesa_is_mipmap_filter() helper
Brian Paul
brianp at vmware.com
Sun Mar 18 09:49:27 PDT 2012
---
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
More information about the mesa-dev
mailing list