summaryrefslogtreecommitdiff
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/shaders.c')
-rw-r--r--src/mesa/main/shaders.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index f0db0d2a81..7491d00c35 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.
*
@@ -233,13 +233,23 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
GET_CURRENT_CONTEXT(ctx);
/* Implement in terms of GetProgramiv, GetShaderiv */
if (ctx->Driver.IsProgram(ctx, object)) {
- ctx->Driver.GetProgramiv(ctx, object, pname, params);
+ if (pname == GL_OBJECT_TYPE_ARB) {
+ *params = GL_PROGRAM_OBJECT_ARB;
+ }
+ else {
+ ctx->Driver.GetProgramiv(ctx, object, pname, params);
+ }
}
else if (ctx->Driver.IsShader(ctx, object)) {
- ctx->Driver.GetShaderiv(ctx, object, pname, params);
+ if (pname == GL_OBJECT_TYPE_ARB) {
+ *params = GL_SHADER_OBJECT_ARB;
+ }
+ else {
+ ctx->Driver.GetShaderiv(ctx, object, pname, params);
+ }
}
else {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetObjectParameterivARB");
}
}