summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_draw.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-17 20:37:58 +0200
committerMarek Olšák <[email protected]>2016-07-30 15:02:14 +0200
commit79dcd69afae4ada47fd4e746e9eec87c6d8028f0 (patch)
tree745e9f03a097f4d00f4ab39e0870e90b4d9be571 /src/mesa/state_tracker/st_draw.c
parent1f73e2bb942783bf143185a58d2290fda2b08c81 (diff)
st/mesa: remove excessive shader state dirtying
This just needs to be done by st_validate_state. v2: add "shaders_may_be_dirty" flags for not skipping st_validate_state on _NEW_PROGRAM to detect real shader changes Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r--src/mesa/state_tracker/st_draw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 92eb4a39e9b..b248dafc9a2 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -173,7 +173,8 @@ st_draw_vbo(struct gl_context *ctx,
st_invalidate_readpix_cache(st);
/* Validate state. */
- if ((st->dirty | ctx->NewDriverState) & ST_PIPELINE_RENDER_STATE_MASK) {
+ if ((st->dirty | ctx->NewDriverState) & ST_PIPELINE_RENDER_STATE_MASK ||
+ st->gfx_shaders_may_be_dirty) {
st_validate_state(st, ST_PIPELINE_RENDER);
}
@@ -278,7 +279,8 @@ st_indirect_draw_vbo(struct gl_context *ctx,
assert(stride);
/* Validate state. */
- if ((st->dirty | ctx->NewDriverState) & ST_PIPELINE_RENDER_STATE_MASK) {
+ if ((st->dirty | ctx->NewDriverState) & ST_PIPELINE_RENDER_STATE_MASK ||
+ st->gfx_shaders_may_be_dirty) {
st_validate_state(st, ST_PIPELINE_RENDER);
}