[Mesa-dev] [PATCH 3/8] st/mesa: remove TES/TCS/GS state dirtying optimization

Marek Olšák maraeo at gmail.com
Sun Aug 7 01:12:19 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

This will be replaced with a better mechanism.
---
 src/mesa/state_tracker/st_atom.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 7548a29..9985168 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -126,28 +126,20 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
    /* Get pipeline state. */
    switch (pipeline) {
    case ST_PIPELINE_RENDER:
       if (st->ctx->API == API_OPENGL_COMPAT)
          check_attrib_edgeflag(st);
 
       check_program_state(st);
       st_manager_validate_framebuffers(st);
 
       pipeline_mask = ST_PIPELINE_RENDER_STATE_MASK;
-
-      /* Don't update states that have no effect. */
-      if (!ctx->TessCtrlProgram._Current)
-         pipeline_mask &= ~ST_NEW_TCS_RESOURCES;
-      if (!ctx->TessEvalProgram._Current)
-         pipeline_mask &= ~ST_NEW_TES_RESOURCES;
-      if (!ctx->GeometryProgram._Current)
-         pipeline_mask &= ~ST_NEW_GS_RESOURCES;
       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:
       unreachable("Invalid pipeline specified");
-- 
2.7.4



More information about the mesa-dev mailing list