summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.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_atom.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_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index ef50ef9df9a..06c523e8b8e 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -72,6 +72,14 @@ static void check_program_state( struct st_context *st )
if (ctx->GeometryProgram._Current != &st->gp->Base)
st->dirty |= ST_NEW_GEOMETRY_PROGRAM;
+
+ if (ctx->TessCtrlProgram._Current != &st->tcp->Base)
+ st->dirty |= ST_NEW_TESSCTRL_PROGRAM;
+
+ if (ctx->TessEvalProgram._Current != &st->tep->Base)
+ st->dirty |= ST_NEW_TESSEVAL_PROGRAM;
+
+ st->gfx_shaders_may_be_dirty = false;
}
static void check_attrib_edgeflag(struct st_context *st)
@@ -135,8 +143,13 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
pipeline_mask &= ~ST_NEW_GS_RESOURCES;
if (!ctx->Transform.ClipPlanesEnabled)
pipeline_mask &= ~ST_NEW_CLIP_STATE;
+
break;
case ST_PIPELINE_COMPUTE:
+ if (ctx->ComputeProgram._Current != &st->cp->Base)
+ st->dirty |= ST_NEW_COMPUTE_PROGRAM;
+
+ st->compute_shader_may_be_dirty = false;
pipeline_mask = ST_PIPELINE_COMPUTE_STATE_MASK;
break;
default: