mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +02:00
GLSL: Implement GL_OBJECT_TYPE_ARB query
The GL_OBJECT_TYPE_ARB query is handled directly in _mesa_GetObjectParamterivARB because it is only supported in the extension version of the shanding language API. glGetProgramiv and glGetShaderiv should not accept this enum.
This commit is contained in:
parent
905d8e0742
commit
3ab4b2066f
1 changed files with 10 additions and 2 deletions
|
|
@ -233,10 +233,18 @@ _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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue