From 2ce12f084113a0097fa1a0d67e2f8fe1ab70092b Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 15 Jul 2011 11:25:17 +0200 Subject: xserver libX11 mesa git update 15 July --- mesalib/src/mesa/program/program.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'mesalib/src/mesa/program/program.c') diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c index 78efca9f1..adca094ee 100644 --- a/mesalib/src/mesa/program/program.c +++ b/mesalib/src/mesa/program/program.c @@ -421,12 +421,15 @@ _mesa_lookup_program(struct gl_context *ctx, GLuint id) /** * Reference counting for vertex/fragment programs + * This is normally only called from the _mesa_reference_program() macro + * when there's a real pointer change. */ void -_mesa_reference_program(struct gl_context *ctx, - struct gl_program **ptr, - struct gl_program *prog) +_mesa_reference_program_(struct gl_context *ctx, + struct gl_program **ptr, + struct gl_program *prog) { +#ifndef NDEBUG assert(ptr); if (*ptr && prog) { /* sanity check */ @@ -438,9 +441,8 @@ _mesa_reference_program(struct gl_context *ctx, else if ((*ptr)->Target == MESA_GEOMETRY_PROGRAM) ASSERT(prog->Target == MESA_GEOMETRY_PROGRAM); } - if (*ptr == prog) { - return; /* no change */ - } +#endif + if (*ptr) { GLboolean deleteFlag; -- cgit v1.2.3