From: Brian Paul Date: Fri, 26 Sep 2008 13:40:45 +0000 (-0600) Subject: mesa: fix assertion in _mesa_reference_program() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4bc39c58eb7fdf3a0be62bed666998a0d1789dcf;p=mesa.git mesa: fix assertion in _mesa_reference_program() --- diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index b3618641e50..738891a0293 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -372,7 +372,11 @@ _mesa_reference_program(GLcontext *ctx, assert(ptr); if (*ptr && prog) { /* sanity check */ - ASSERT((*ptr)->Target == prog->Target); + if ((*ptr)->Target == GL_VERTEX_PROGRAM_ARB) + ASSERT(prog->Target == GL_VERTEX_PROGRAM_ARB); + else if ((*ptr)->Target == GL_FRAGMENT_PROGRAM_ARB) + ASSERT(prog->Target == GL_FRAGMENT_PROGRAM_ARB || + prog->Target == GL_FRAGMENT_PROGRAM_NV); } if (*ptr == prog) { return; /* no change */