Mesa (master): mesa: make use of NewScissorTest driver flags

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Fri Jun 9 07:40:37 UTC 2017


Module: Mesa
Branch: master
Commit: cde963ec359c07182f8633863ec0ecc1ea9fe451
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cde963ec359c07182f8633863ec0ecc1ea9fe451

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Jun  6 15:23:58 2017 +0200

mesa: make use of NewScissorTest driver flags

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/mesa/main/enable.c              | 2 ++
 src/mesa/state_tracker/st_context.c | 4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 52c791587e..91c1f0d447 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 1c1c55afe3..b99a53b3c7 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,




More information about the mesa-commit mailing list