X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fvega%2Fapi_masks.c;fp=src%2Fgallium%2Fstate_trackers%2Fvega%2Fapi_masks.c;h=3cc4a0b5a32a16326a3cf3574f7baba9ef1b0ce4;hb=96c6637a1360f146bbf49ffb207ae943ecbbdf49;hp=45f77d7d707c49eeb254d67983492558216021e1;hpb=438359597cd4254558f4d2fd5b54eb32c03e1b4c;p=mesa.git diff --git a/src/gallium/state_trackers/vega/api_masks.c b/src/gallium/state_trackers/vega/api_masks.c index 45f77d7d707..3cc4a0b5a32 100644 --- a/src/gallium/state_trackers/vega/api_masks.c +++ b/src/gallium/state_trackers/vega/api_masks.c @@ -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)) {