Browse Source

ARB prog: Set error instead of falling through with incorrect value

If a fragment program only parameter was queried of a vertex program
(e.g., GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) no error would be set and
a random value would be returned.  This caused 'glxinfo -l' to show
the same values for GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB,
GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB as for
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB.  This is confusing and incorrect.

(cherry picked from master, commit 4bccd693a7)
tags/mesa_7_5_1
Brian Paul 16 years ago
parent
commit
bf7e4b10cb
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/mesa/shader/arbprogram.c

+ 3
- 0
src/mesa/shader/arbprogram.c View File

@@ -985,6 +985,9 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
return;
}
} else {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramivARB(pname)");
return;
}
}


Loading…
Cancel
Save