diff options
Diffstat (limited to 'src/mesa/main/samplerobj.h')
-rw-r--r-- | src/mesa/main/samplerobj.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index fe7d5a7d3b6..c22d025dfdf 100644 --- a/src/mesa/main/samplerobj.h +++ b/src/mesa/main/samplerobj.h @@ -38,9 +38,19 @@ _mesa_get_samplerobj(struct gl_context *ctx, GLuint unit) } 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); |