mesa: make use of NewScissorRect driver flags
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 6 Jun 2017 13:21:43 +0000 (15:21 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 9 Jun 2017 07:33:26 +0000 (09:33 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/scissor.c
src/mesa/state_tracker/st_context.c

index c04c64ca3fe20f57cf0f55b5c0bbfcc5f8379e6b..2f2e226ab9308f9b0c04e7c61a930cc8fec706f5 100644 (file)
@@ -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;
index 743c7bde28078d1c74835153d0ae5640ce9e3d46..1c1c55afe3c6d61848cad1ebebcdea1fc3dd3590 100644 (file)
@@ -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,