aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustaw Smolarczyk <[email protected]>2017-03-30 20:09:21 +0200
committerMarek Olšák <[email protected]>2017-04-08 20:29:58 +0200
commit439eca951f7d4e58caa76e9f89d57733a6dfa470 (patch)
tree9a23f3eba32eb585d989c2e9c5c1b912c16717a6
parent3cc91537fa9edb4924a7492465ef845f165462df (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp4
1 files changed, 1 insertions, 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<<i);
key->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: