From: Gustaw Smolarczyk Date: Thu, 30 Mar 2017 18:09:21 +0000 (+0200) Subject: mesa/main/ff_frag: Remove enabled_units. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=439eca951f7d4e58caa76e9f89d57733a6dfa470;p=mesa.git mesa/main/ff_frag: Remove enabled_units. Its only usage is easily replaced by nr_enabled_units. As for cache key part, unit[i].enabled should be enough. Signed-off-by: Gustaw Smolarczyk Reviewed-by: Eric Anholt Signed-off-by: Marek Olšák --- diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 7679328d4ce..d1e89abc085 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -101,7 +101,6 @@ struct mode_opt { struct state_key { GLuint nr_enabled_units:8; - GLuint enabled_units:8; GLuint separate_specular:1; GLuint fog_mode:2; /**< FOG_x */ GLuint inputs_available:12; @@ -421,7 +420,6 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key ) format = _mesa_texture_base_format(texObj); key->unit[i].enabled = 1; - key->enabled_units |= (1<nr_enabled_units = i + 1; inputs_referenced |= VARYING_BIT_TEX(i); @@ -1136,7 +1134,7 @@ emit_instructions(texenv_fragment_program *p) struct state_key *key = p->state; GLuint unit; - if (key->enabled_units) { + if (key->nr_enabled_units) { /* First pass - to support texture_env_crossbar, first identify * all referenced texture sources and emit texld instructions * for each: