From 462f18c7b25fe3e467f837647d07ab0a78aa8d2b Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 22 Feb 2015 21:39:56 +0100 Subject: Merged origin/release (checked in because wanted to merge new stuff) --- mesalib/src/mesa/main/shaderobj.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mesalib/src/mesa/main/shaderobj.h') diff --git a/mesalib/src/mesa/main/shaderobj.h b/mesalib/src/mesa/main/shaderobj.h index 05ddfeb50..92f7a33ee 100644 --- a/mesalib/src/mesa/main/shaderobj.h +++ b/mesalib/src/mesa/main/shaderobj.h @@ -62,9 +62,20 @@ _mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller) extern void -_mesa_reference_shader_program(struct gl_context *ctx, +_mesa_reference_shader_program_(struct gl_context *ctx, struct gl_shader_program **ptr, struct gl_shader_program *shProg); + +static inline void +_mesa_reference_shader_program(struct gl_context *ctx, + struct gl_shader_program **ptr, + struct gl_shader_program *shProg) +{ + if (*ptr != shProg) + _mesa_reference_shader_program_(ctx, ptr, shProg); +} + + extern void _mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader); -- cgit v1.2.3