diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /mesalib/src/mesa/main/samplerobj.h | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-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.h | 21 |
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); |