summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 7072cbe62c..13589151ba 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -134,16 +134,7 @@ void st_resize_framebuffer( struct st_framebuffer *stfb,
if (stfb->Base.Width != width || stfb->Base.Height != height) {
GET_CURRENT_CONTEXT(ctx);
if (ctx) {
- if (stfb->InitWidth == 0 && stfb->InitHeight == 0) {
- /* didn't have a valid size until now */
- stfb->InitWidth = width;
- stfb->InitHeight = height;
- if (ctx->Viewport.Width <= 1) {
- /* set context's initial viewport/scissor size */
- _mesa_set_viewport(ctx, 0, 0, width, height);
- _mesa_set_scissor(ctx, 0, 0, width, height);
- }
- }
+ _mesa_check_init_viewport(ctx, width, height);
_mesa_resize_framebuffer(ctx, &stfb->Base, width, height);