aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/samplerobj.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /mesalib/src/mesa/main/samplerobj.h
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'mesalib/src/mesa/main/samplerobj.h')
-rw-r--r--mesalib/src/mesa/main/samplerobj.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/samplerobj.h b/mesalib/src/mesa/main/samplerobj.h
index fe7d5a7d3..0bfda4351 100644
--- a/mesalib/src/mesa/main/samplerobj.h
+++ b/mesalib/src/mesa/main/samplerobj.h
@@ -37,10 +37,29 @@ _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,
+ struct gl_sampler_object *samp);
+
+static inline void
_mesa_reference_sampler_object(struct gl_context *ctx,
struct gl_sampler_object **ptr,
- struct gl_sampler_object *samp);
+ struct gl_sampler_object *samp)
+{
+ if (*ptr != samp)
+ _mesa_reference_sampler_object_(ctx, ptr, samp);
+}
+
extern void
_mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name);