summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-26 07:40:45 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-26 07:40:45 -0600
commit4bc39c58eb7fdf3a0be62bed666998a0d1789dcf (patch)
tree884772e205f16131a62516154874d971fecfb8ae
parentee80c64be8ebeebc1cf4c4913049eb07b9326b96 (diff)
mesa: fix assertion in _mesa_reference_program()
-rw-r--r--src/mesa/shader/program.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index b3618641e5..738891a029 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 */