summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-08-06 12:45:14 -0600
committerBrian Paul <[email protected]>2008-08-06 12:45:14 -0600
commit18cd9c229a1fc8da8b7669b8d1d100f6bbeca183 (patch)
tree4c6f103fe9228dfa7baa70e5e4a7aeb2b66801d7 /src/mesa
parent5fc6f6a33faed0dbfe67a0689d8f261633e21529 (diff)
mesa: glsl: fix error check in get_uniformfv()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/shader_api.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 5c18e55dacf..86b3d536e56 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -50,6 +50,11 @@
+#ifndef GL_PROGRAM_BINARY_LENGTH_OES
+#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
+#endif
+
+
/**
* Allocate a new gl_shader_program object, initialize it.
*/
@@ -906,6 +911,9 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program,
if (*params > 0)
(*params)++; /* add one for terminating zero */
break;
+ case GL_PROGRAM_BINARY_LENGTH_OES:
+ *params = 0;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname)");
return;
@@ -999,7 +1007,7 @@ get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
GLfloat *params)
{
struct gl_shader_program *shProg
- = _mesa_lookup_shader_program(ctx, program);
+ = _mesa_lookup_shader_program_err(ctx, program, "glGetUniform[if]v");
if (shProg) {
if (shProg->Uniforms &&
location >= 0 && location < (GLint) shProg->Uniforms->NumUniforms) {
@@ -1033,9 +1041,6 @@ get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(location)");
}
}
- else {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)");
- }
return 0;
}