From: Samuel Pitoiset Date: Tue, 6 Jun 2017 13:23:58 +0000 (+0200) Subject: mesa: make use of NewScissorTest driver flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cde963ec359c07182f8633863ec0ecc1ea9fe451;p=mesa.git mesa: make use of NewScissorTest driver flags Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 52c791587ef..91c1f0d4472 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -671,6 +671,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) state * ((1 << ctx->Const.MaxViewports) - 1); if (newEnabled != ctx->Scissor.EnableFlags) { FLUSH_VERTICES(ctx, _NEW_SCISSOR); + ctx->NewDriverState |= ctx->DriverFlags.NewScissorTest; ctx->Scissor.EnableFlags = newEnabled; } } @@ -1113,6 +1114,7 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap, } if (((ctx->Scissor.EnableFlags >> index) & 1) != state) { FLUSH_VERTICES(ctx, _NEW_SCISSOR); + ctx->NewDriverState |= ctx->DriverFlags.NewScissorTest; if (state) ctx->Scissor.EnableFlags |= (1 << index); else diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 1c1c55afe3c..b99a53b3c7f 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -200,9 +200,6 @@ st_invalidate_state(struct gl_context * ctx) if (new_state & _NEW_PROGRAM) st->dirty |= ST_NEW_RASTERIZER; - if (new_state & _NEW_SCISSOR) - st->dirty |= ST_NEW_RASTERIZER; - if (new_state & _NEW_FOG) st->dirty |= ST_NEW_FS_STATE; @@ -523,6 +520,7 @@ static void st_init_driver_flags(struct st_context *st) f->NewWindowRectangles = ST_NEW_WINDOW_RECTANGLES; f->NewFramebufferSRGB = ST_NEW_FRAMEBUFFER; f->NewScissorRect = ST_NEW_SCISSOR; + f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER; } struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,