<param name="pname" type="GLenum"/>
<vector name="params" type="GLtype *" size="dynamic"/>
</proto>
-
- <desc name="pname">
- <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES" category="OES_framebuffer_object"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES" category="OES_framebuffer_object"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES" category="OES_framebuffer_object"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES" category="OES_framebuffer_object"/>
-
- <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE" category="GLES2.0"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME" category="GLES2.0"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL" category="GLES2.0"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE" category="GLES2.0"/>
- <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES" category="OES_texture_3D"/>
-
- <desc name="params" vector_size="1" convert="false"/>
- </desc>
</template>
<template name="GetRenderbufferParameter" direction="get">
}
else {
assert(att->Type == GL_NONE);
- if (_mesa_is_desktop_gl(ctx)) {
+ if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
*params = 0;
} else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ goto invalid_pname_enum;
}
}
return;
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ goto invalid_pname_enum;
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
"glGetFramebufferAttachmentParameterivEXT(pname)");
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ goto invalid_pname_enum;
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
- if (att->Type == GL_TEXTURE) {
+ if (ctx->API == API_OPENGLES) {
+ goto invalid_pname_enum;
+ } else if (att->Type == GL_NONE) {
+ _mesa_error(ctx, err,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ } else if (att->Type == GL_TEXTURE) {
if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) {
*params = att->Zoffset;
}
*params = 0;
}
}
- else if (att->Type == GL_NONE) {
- _mesa_error(ctx, err,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- }
else {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ goto invalid_pname_enum;
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_framebuffer_object)
+ && !_mesa_is_gles3(ctx)) {
+ goto invalid_pname_enum;
}
else if (att->Type == GL_NONE) {
_mesa_error(ctx, err,
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- return;
+ if ((ctx->API != API_OPENGL || !ctx->Extensions.ARB_framebuffer_object)
+ && ctx->API != API_OPENGL_CORE
+ && !_mesa_is_gles3(ctx)) {
+ goto invalid_pname_enum;
}
else if (att->Type == GL_NONE) {
_mesa_error(ctx, err,
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
- if (!ctx->Extensions.ARB_framebuffer_object) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
+ if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_framebuffer_object)
+ && !_mesa_is_gles3(ctx)) {
+ goto invalid_pname_enum;
}
else if (att->Type == GL_NONE) {
_mesa_error(ctx, err,
}
return;
default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetFramebufferAttachmentParameterivEXT(pname)");
- return;
+ goto invalid_pname_enum;
}
+
+ return;
+
+invalid_pname_enum:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameteriv(pname)");
+ return;
}