diff options
author | Marek Olšák <[email protected]> | 2017-06-07 23:06:09 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-12 18:24:37 +0200 |
commit | 0d62e8a727cfd3327e21fdda1a3e95a81e2c7f0b (patch) | |
tree | 4c9e41416366f438c12dc76a640a59016e055eb1 /src/mesa/state_tracker | |
parent | 9a22c8561859edf6edc7641be1a0973792293941 (diff) |
st/mesa: call check_program_state only when needed
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index cbac7629e9c..bcfbcf878f0 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -116,7 +116,6 @@ static void check_program_state( struct st_context *st ) } st->dirty |= dirty; - st->gfx_shaders_may_be_dirty = false; } static void check_attrib_edgeflag(struct st_context *st) @@ -171,7 +170,11 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline ) if (st->ctx->API == API_OPENGL_COMPAT) check_attrib_edgeflag(st); - check_program_state(st); + if (st->gfx_shaders_may_be_dirty) { + check_program_state(st); + st->gfx_shaders_may_be_dirty = false; + } + st_manager_validate_framebuffers(st); pipeline_mask = ST_PIPELINE_RENDER_STATE_MASK; |