mesa: invalidate framebuffer when changing parameters
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 23 Jan 2016 14:27:22 +0000 (09:27 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 2 Feb 2016 22:08:46 +0000 (17:08 -0500)
This fixes dEQP-GLES31.functional.fbo.completeness.no_attachments

When the width or height are 0, the framebuffer is incomplete. We may
also not have been passing the new state down to the driver when the
widths/heights/etc changed. Make sure to dirty the state so that the
framebuffer state is revalidated at draw time.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/fbobject.c

index 3be216da2340c5d4a99cd16ddc6e5db50f4876c2..2d4acb35bd6a3384bc05dd4b82138b3b17c51fad 100644 (file)
@@ -1414,6 +1414,9 @@ framebuffer_parameteri(struct gl_context *ctx, struct gl_framebuffer *fb,
       _mesa_error(ctx, GL_INVALID_ENUM,
                   "%s(pname=0x%x)", func, pname);
    }
+
+   invalidate_framebuffer(fb);
+   ctx->NewState |= _NEW_BUFFERS;
 }
 
 void GLAPIENTRY