From: Brian Paul Date: Sat, 17 Mar 2012 22:30:03 +0000 (-0600) Subject: mesa: add _mesa_is_mipmap_filter() helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b219b2c310911286f375d6b9967d5fd39ec1188a;p=mesa.git mesa: add _mesa_is_mipmap_filter() helper Reviewed-by: José Fonseca Reviewed-by: Eric Anholt --- 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,