summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-10-16 08:23:28 -0600
committerBrian Paul <[email protected]>2008-10-16 08:23:53 -0600
commita7b24ac02f80efd83e93b4597a2c0e5a6ba198fe (patch)
tree483d7e237a219211ef5c5f7ae827f684cc190bf4
parent4830809524b20e517e949151957512b14d7e679a (diff)
mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861
-rw-r--r--src/mesa/main/shaders.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index e5c54bb10d7..7491d00c357 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.1
+ * Version: 7.3
*
* Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
*
@@ -235,30 +235,21 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
if (ctx->Driver.IsProgram(ctx, object)) {
if (pname == GL_OBJECT_TYPE_ARB) {
*params = GL_PROGRAM_OBJECT_ARB;
- } else {
+ }
+ else {
ctx->Driver.GetProgramiv(ctx, object, pname, params);
}
}
else if (ctx->Driver.IsShader(ctx, object)) {
if (pname == GL_OBJECT_TYPE_ARB) {
*params = GL_SHADER_OBJECT_ARB;
- } else {
+ }
+ else {
ctx->Driver.GetShaderiv(ctx, object, pname, params);
}
}
else {
- /* error code depends on pname */
- GLenum err;
- switch (pname) {
- case GL_OBJECT_TYPE_ARB:
- case GL_OBJECT_DELETE_STATUS_ARB:
- case GL_OBJECT_INFO_LOG_LENGTH_ARB:
- err = GL_INVALID_OPERATION;
- break;
- default:
- err = GL_INVALID_VALUE;
- }
- _mesa_error(ctx, err, "glGetObjectParameterivARB");
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB");
}
}