mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 13:10:25 +01:00
mesa: fix assertion in _mesa_reference_program()
This commit is contained in:
parent
ee80c64be8
commit
4bc39c58eb
1 changed files with 5 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue