st/vega: Use st_framebuffer for fb width/height.
[mesa.git] / src / gallium / state_trackers / vega / api_masks.c
index 45f77d7d707c49eeb254d67983492558216021e1..3cc4a0b5a32a16326a3cf3574f7baba9ef1b0ce4 100644 (file)
@@ -81,7 +81,7 @@ void vegaClear(VGint x, VGint y,
                VGint width, VGint height)
 {
    struct vg_context *ctx = vg_current_context();
-   struct pipe_framebuffer_state *fb;
+   struct st_framebuffer *stfb = ctx->draw_buffer;
 
    if (width <= 0 || height <= 0) {
       vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR);
@@ -98,10 +98,9 @@ void vegaClear(VGint x, VGint y,
                 ctx->state.vg.clear_color[3]);
 #endif
 
-   fb = &ctx->state.g3d.fb;
    /* check for a whole surface clear */
    if (!ctx->state.vg.scissoring &&
-       (x == 0 && y == 0 && width == fb->width && height == fb->height)) {
+       (x == 0 && y == 0 && width == stfb->width && height == stfb->height)) {
       ctx->pipe->clear(ctx->pipe, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL,
                        ctx->state.vg.clear_color, 1., 0);
    } else if (renderer_clear_begin(ctx->renderer)) {