summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/ggi/ggimesa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/ggi/ggimesa.c')
-rw-r--r--src/mesa/drivers/ggi/ggimesa.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c
index 64312204c5..4fbbe61ab8 100644
--- a/src/mesa/drivers/ggi/ggimesa.c
+++ b/src/mesa/drivers/ggi/ggimesa.c
@@ -257,10 +257,18 @@ static void gl_ggiGetSize(GLframebuffer *fb, GLuint *width, GLuint *height)
printf("returning %d, %d\n", *width, *height);
}
+/**
+ * We only implement this function as a mechanism to check if the
+ * framebuffer size has changed (and update corresponding state).
+ */
static void gl_ggiViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
- /* poll for window size change and realloc software Z/stencil/etc if needed */
- _mesa_ResizeBuffersMESA();
+ GLuint newWidth, newHeight;
+ GLframebuffer *buffer = ctx->WinSysDrawBuffer;
+ gl_ggiGetSize( buffer, &newWidth, &newHeight );
+ if (buffer->Width != newWidth || buffer->Height != newHeight) {
+ _mesa_resize_framebuffer(ctx, buffer, newWidth, newHeight );
+ }
}