Ian Romanick <[email protected]> writes: > diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c > index 77e9910..1d2047f 100644 > --- a/src/mesa/main/fbobject.c > +++ b/src/mesa/main/fbobject.c > @@ -2366,8 +2366,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum > target, GLenum attachment, > if (_mesa_is_desktop_gl(ctx)) { > *params = 0; > } else { > - _mesa_error(ctx, GL_INVALID_ENUM, > - "glGetFramebufferAttachmentParameterivEXT(pname)"); > + goto invalid_pname_enum; > } > }
gles3 spec p233:
"If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, no
framebuffer is bound to target. In this case querying pname
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero, and all other
queries will generate an INVALID_OPERATION error."
So we need "_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)". Also, the
"err" value set up above needs "|| _mesa_is_gles3(ctx)"
> _mesa_error(ctx, err,
> @@ -2476,9 +2474,10 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum
> target, GLenum attachment,
> 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 ((ctx->API != API_OPENGL || !ctx->Extensions.ARB_framebuffer_object)
> + && ctx->API != API_OPENGL_CORE
Since API_OPENGL_CORE implies ARB_fbo, this could potentially be the
changed to the pattern I've seen elsewhere of
"!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_fbo"
(possibly folding that !desktop negation)
pgppw0dpJNcMF.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
