summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-07 12:14:54 +1000
committerTimothy Arceri <[email protected]>2017-06-09 09:13:46 +1000
commitf627ac6e355a5eeb9618a0e4fff0ec26bd3c63ba (patch)
tree17b0d7f7e1adc942cf1cf3ebd16c09d309a4786a /src/mesa/state_tracker/st_context.c
parentdf27aba422fa88c8e1a6d40d625e07f6a879db3e (diff)
st/mesa: add st_invalidate_buffers() helper
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index ba08e98b87d..33bc16713c6 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -161,25 +161,33 @@ st_get_active_states(struct gl_context *ctx)
}
+void
+st_invalidate_buffers(struct st_context *st)
+{
+ st->dirty |= ST_NEW_BLEND |
+ ST_NEW_DSA |
+ ST_NEW_FB_STATE |
+ ST_NEW_SAMPLE_MASK |
+ ST_NEW_SAMPLE_SHADING |
+ ST_NEW_FS_STATE |
+ ST_NEW_POLY_STIPPLE |
+ ST_NEW_VIEWPORT |
+ ST_NEW_RASTERIZER |
+ ST_NEW_SCISSOR |
+ ST_NEW_WINDOW_RECTANGLES;
+}
+
+
/**
* Called via ctx->Driver.UpdateState()
*/
-void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
+static void
+st_invalidate_state(struct gl_context * ctx, GLbitfield new_state)
{
struct st_context *st = st_context(ctx);
if (new_state & _NEW_BUFFERS) {
- st->dirty |= ST_NEW_BLEND |
- ST_NEW_DSA |
- ST_NEW_FB_STATE |
- ST_NEW_SAMPLE_MASK |
- ST_NEW_SAMPLE_SHADING |
- ST_NEW_FS_STATE |
- ST_NEW_POLY_STIPPLE |
- ST_NEW_VIEWPORT |
- ST_NEW_RASTERIZER |
- ST_NEW_SCISSOR |
- ST_NEW_WINDOW_RECTANGLES;
+ st_invalidate_buffers(st);
} else {
/* These set a subset of flags set by _NEW_BUFFERS, so we only have to
* check them when _NEW_BUFFERS isn't set.