[Mesa-dev] [PATCH 2/3] mesa: make use of NewScissorRect driver flags

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jun 6 19:59:57 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mesa/main/scissor.c             | 2 ++
 src/mesa/state_tracker/st_context.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c
index 808cb4d5fe..fb7cf0ebb2 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 8a5dd2f725..d8ec45f118 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -192,8 +192,7 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
          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;
@@ -514,6 +513,7 @@ static void st_init_driver_flags(struct gl_driver_flags *f)
    f->NewShaderStorageBuffer = ST_NEW_STORAGE_BUFFER;
    f->NewImageUnits = ST_NEW_IMAGE_UNITS;
    f->NewWindowRectangles = ST_NEW_WINDOW_RECTANGLES;
+   f->NewScissorRect = ST_NEW_SCISSOR;
 }
 
 struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
-- 
2.13.0



More information about the mesa-dev mailing list