[cogl] arbfp: remove redundant unit_state re-initialization



commit d43505db22e3dcd384e78894c3c3f877363f65f0
Author: Robert Bragg <robert linux intel com>
Date:   Fri Sep 9 14:28:40 2011 +0100

    arbfp: remove redundant unit_state re-initialization
    
    When we are about to start arbfp codegen we call shader_state_new() to
    allocate new state structures used to build up the code and that
    function makes sure to zero the newly allocated structures.
    
    Right after calling shader_state_new() we were then also explicitly
    iterating though the newly allocated unit_state structures and zeroing
    the .sampled and .dirty_combine_constant members as well as resetting
    shader_state->next_constant_id = 0. This patch removes that redundant
    re-initialization of state.
    
    Reviewed-by: Neil Roberts <neil linux intel com>

 cogl/cogl-pipeline-fragend-arbfp.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
---
diff --git a/cogl/cogl-pipeline-fragend-arbfp.c b/cogl/cogl-pipeline-fragend-arbfp.c
index 813bf14..294daa9 100644
--- a/cogl/cogl-pipeline-fragend-arbfp.c
+++ b/cogl/cogl-pipeline-fragend-arbfp.c
@@ -252,13 +252,6 @@ _cogl_pipeline_fragend_arbfp_start (CoglPipeline *pipeline,
                            "PARAM one = {1, 1, 1, 1};\n"
                            "PARAM two = {2, 2, 2, 2};\n"
                            "PARAM minus_one = {-1, -1, -1, -1};\n");
-
-          for (i = 0; i < n_layers; i++)
-            {
-              shader_state->unit_state[i].sampled = FALSE;
-              shader_state->unit_state[i].dirty_combine_constant = FALSE;
-            }
-          shader_state->next_constant_id = 0;
         }
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]