From d43505db22e3dcd384e78894c3c3f877363f65f0 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 9 Sep 2011 14:28:40 +0100 Subject: [PATCH] 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 --- cogl/cogl-pipeline-fragend-arbfp.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cogl/cogl-pipeline-fragend-arbfp.c b/cogl/cogl-pipeline-fragend-arbfp.c index 813bf1442..294daa96f 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; } }