mesa: add _mesa_is_mipmap_filter() helper
authorBrian Paul <brianp@vmware.com>
Sat, 17 Mar 2012 22:30:03 +0000 (16:30 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Mar 2012 14:23:32 +0000 (08:23 -0600)
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/samplerobj.h

index c22d025dfdfe4184a92cb46de7811ae7cc6b93ed..0bfda43517bd878c270a639627ae5dd064dd8ce8 100644 (file)
@@ -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,