From 439eca951f7d4e58caa76e9f89d57733a6dfa470 Mon Sep 17 00:00:00 2001 From: Gustaw Smolarczyk Date: Thu, 30 Mar 2017 20:09:21 +0200 Subject: [PATCH] mesa/main/ff_frag: Remove enabled_units. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mesa/main/ff_fragment_shader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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: -- 2.30.2