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>
This commit is contained in:
parent
b6cea6bed6
commit
d43505db22
@ -252,13 +252,6 @@ _cogl_pipeline_fragend_arbfp_start (CoglPipeline *pipeline,
|
|||||||
"PARAM one = {1, 1, 1, 1};\n"
|
"PARAM one = {1, 1, 1, 1};\n"
|
||||||
"PARAM two = {2, 2, 2, 2};\n"
|
"PARAM two = {2, 2, 2, 2};\n"
|
||||||
"PARAM minus_one = {-1, -1, -1, -1};\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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user