From: Brian Paul Date: Sat, 16 Oct 2004 00:29:03 +0000 (+0000) Subject: fix if/else bug in _mesa_ProgramEnvParameter4fARB (fdo bug 1645) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83c74b72792928b5a5ac540eeef65fca3145ddb6;p=mesa.git fix if/else bug in _mesa_ProgramEnvParameter4fARB (fdo bug 1645) --- diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 79615d609ce..ad8683f00b2 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -265,7 +265,7 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index, } ASSIGN_4V(ctx->FragmentProgram.Parameters[index], x, y, z, w); } - if (target == GL_VERTEX_PROGRAM_ARB + else if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { if (index >= ctx->Const.MaxVertexProgramEnvParams) { _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter(index)"); @@ -325,7 +325,7 @@ _mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index, } COPY_4V(params, ctx->FragmentProgram.Parameters[index]); } - if (target == GL_VERTEX_PROGRAM_ARB + else if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { if (index >= ctx->Const.MaxVertexProgramEnvParams) { _mesa_error(ctx, GL_INVALID_VALUE, "glGetProgramEnvParameter(index)");