main: call invalidate_framebuffer_storage() with driver's viewport limits
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 1 Mar 2016 11:02:27 +0000 (12:02 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 2 Mar 2016 06:19:01 +0000 (07:19 +0100)
Don't use hardcoded ones because the driver can set different ones.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/fbobject.c

index c9e1518ab23d4fe88ebd7d9076a085f2d708f20b..feab86caa256fefa2fa1eb0eade326094976fbf9 100644 (file)
@@ -4170,7 +4170,8 @@ _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
     */
    invalidate_framebuffer_storage(ctx, fb, numAttachments, attachments,
                                   0, 0,
-                                  MAX_VIEWPORT_WIDTH, MAX_VIEWPORT_HEIGHT,
+                                  ctx->Const.MaxViewportWidth,
+                                  ctx->Const.MaxViewportHeight,
                                   "glInvalidateFramebuffer");
 }
 
@@ -4210,7 +4211,8 @@ _mesa_InvalidateNamedFramebufferData(GLuint framebuffer,
     */
    invalidate_framebuffer_storage(ctx, fb, numAttachments, attachments,
                                   0, 0,
-                                  MAX_VIEWPORT_WIDTH, MAX_VIEWPORT_HEIGHT,
+                                  ctx->Const.MaxViewportWidth,
+                                  ctx->Const.MaxViewportHeight,
                                   "glInvalidateNamedFramebufferData");
 }