From: Samuel Pitoiset Date: Tue, 6 Jun 2017 13:21:43 +0000 (+0200) Subject: mesa: make use of NewScissorRect driver flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=328191f26c7494ff92daf7f1c891bb2aee6c8bd9;p=mesa.git mesa: make use of NewScissorRect driver flags Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index c04c64ca3fe..2f2e226ab93 100644 --- a/src/mesa/main/scissor.c +++ b/src/mesa/main/scissor.c @@ -49,6 +49,8 @@ set_scissor_no_notify(struct gl_context *ctx, unsigned idx, return; FLUSH_VERTICES(ctx, _NEW_SCISSOR); + ctx->NewDriverState |= ctx->DriverFlags.NewScissorRect; + ctx->Scissor.ScissorArray[idx].X = x; ctx->Scissor.ScissorArray[idx].Y = y; ctx->Scissor.ScissorArray[idx].Width = width; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 743c7bde280..1c1c55afe3c 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -201,8 +201,7 @@ st_invalidate_state(struct gl_context * ctx) st->dirty |= ST_NEW_RASTERIZER; if (new_state & _NEW_SCISSOR) - st->dirty |= ST_NEW_RASTERIZER | - ST_NEW_SCISSOR; + st->dirty |= ST_NEW_RASTERIZER; if (new_state & _NEW_FOG) st->dirty |= ST_NEW_FS_STATE; @@ -523,6 +522,7 @@ static void st_init_driver_flags(struct st_context *st) f->NewImageUnits = ST_NEW_IMAGE_UNITS; f->NewWindowRectangles = ST_NEW_WINDOW_RECTANGLES; f->NewFramebufferSRGB = ST_NEW_FRAMEBUFFER; + f->NewScissorRect = ST_NEW_SCISSOR; } struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,