From b219b2c310911286f375d6b9967d5fd39ec1188a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 17 Mar 2012 16:30:03 -0600 Subject: [PATCH] mesa: add _mesa_is_mipmap_filter() helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: José Fonseca Reviewed-by: Eric Anholt --- src/mesa/main/samplerobj.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index c22d025dfdf..0bfda43517b 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, -- 2.30.2