aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-03-17 16:30:03 -0600
committerBrian Paul <[email protected]>2012-03-20 08:23:32 -0600
commitb219b2c310911286f375d6b9967d5fd39ec1188a (patch)
treedb9f3145d723d92b6e2e7acb6ed461cf2bf4bc95 /src
parentff005bdb7cdeb84477b26796ac216459e49daa55 (diff)
mesa: add _mesa_is_mipmap_filter() helper
Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/samplerobj.h9
1 files changed, 9 insertions, 0 deletions
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,