summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-09 20:51:20 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commit480bf7731bf54ac936ec7edfa977aeeb377745b6 (patch)
tree15f17a18a1eb04857a5c051967c36930ae336740 /src/mesa/state_tracker
parentc2408838c83719cb133332c7adac71ef50503259 (diff)
mesa: stop using _NEW_STENCIL with st/mesa, use DriverFlags.NewStencil instead
This bypasses _mesa_update_state_locked. Before: DrawElements ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 3.99 million DrawArrays ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 4.56 million After: DrawElements ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 4.93 million DrawArrays ( 1 VBOs, 4 UBOs, 8 Tex) w/ stencil enable change: 5.84 million It's quite a difference in the draw call rate when ctx->NewState stays equal to 0 the whole time. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index a0bd9ea7e38..b7bdc47bd53 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -193,8 +193,7 @@ st_invalidate_state(struct gl_context * ctx)
/* These set a subset of flags set by _NEW_BUFFERS, so we only have to
* check them when _NEW_BUFFERS isn't set.
*/
- if (new_state & (_NEW_DEPTH |
- _NEW_STENCIL))
+ if (new_state & _NEW_DEPTH)
st->dirty |= ST_NEW_DSA;
if (new_state & _NEW_PROGRAM)
@@ -523,6 +522,7 @@ static void st_init_driver_flags(struct st_context *st)
f->NewFramebufferSRGB = ST_NEW_FB_STATE;
f->NewScissorRect = ST_NEW_SCISSOR;
f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER;
+ f->NewStencil = ST_NEW_DSA;
}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,