st/vega: Fix window resizing with egl_g3d.
[mesa.git] / src / gallium / state_trackers / vega / vg_tracker.c
index ff80aab03a389d77d203ae5fa10e570761558052..617c174eb6a0054565cb46525e199b421289571a 100644 (file)
@@ -193,8 +193,8 @@ struct st_framebuffer * st_create_framebuffer(const void *visual,
       */
       stfb->alpha_mask = 0;
 
-      stfb->init_width = width;
-      stfb->init_height = height;
+      stfb->width = width;
+      stfb->height = height;
       stfb->privateData = privateData;
    }
 
@@ -282,11 +282,14 @@ void st_resize_framebuffer(struct st_framebuffer *stfb,
 
    /* If this is a noop, exit early and don't do the clear, etc below.
     */
-   if (strb->width == width &&
-       strb->height == height &&
+   if (stfb->width == width &&
+       stfb->height == height &&
        state->zsbuf)
       return;
 
+   stfb->width = width;
+   stfb->height = height;
+
    if (strb->width != width || strb->height != height)
       st_renderbuffer_alloc_storage(ctx, strb,
                                  width, height);