On 12/12/2012 03:25 PM, Anuj Phogat wrote:
This allows query on default framebuffer in 
glGetFramebufferAttachmentParameteriv()
for gles3. Fixes unexpected GL errors in gles3 conformance test case:
framebuffer_blit_functionality_multisampled_to_singlesampled_blit

Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com>

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

---
  src/mesa/main/fbobject.c |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 9e32836..d87239e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -250,6 +250,7 @@ _mesa_get_fb0_attachment(struct gl_context *ctx, struct 
gl_framebuffer *fb,
        return &fb->Attachment[BUFFER_FRONT_LEFT];
     case GL_FRONT_RIGHT:
        return &fb->Attachment[BUFFER_FRONT_RIGHT];
+   case GL_BACK:
     case GL_BACK_LEFT:
        return &fb->Attachment[BUFFER_BACK_LEFT];
     case GL_BACK_RIGHT:
@@ -2369,7 +2370,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, 
GLenum attachment,
         * OES_framebuffer_object spec refers to the EXT_framebuffer_object
         * spec.
         */
-      if (!_mesa_is_desktop_gl(ctx) || 
!ctx->Extensions.ARB_framebuffer_object) {
+      if ((!_mesa_is_desktop_gl(ctx) || 
!ctx->Extensions.ARB_framebuffer_object)
+          && !_mesa_is_gles3(ctx)) {
         _mesa_error(ctx, GL_INVALID_OPERATION,
                     "glGetFramebufferAttachmentParameteriv(bound FBO = 0)");
         return;


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to