mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
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 <wielkiegie@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
3cc91537fa
commit
439eca951f
1 changed files with 1 additions and 3 deletions
|
|
@ -101,7 +101,6 @@ struct mode_opt {
|
||||||
|
|
||||||
struct state_key {
|
struct state_key {
|
||||||
GLuint nr_enabled_units:8;
|
GLuint nr_enabled_units:8;
|
||||||
GLuint enabled_units:8;
|
|
||||||
GLuint separate_specular:1;
|
GLuint separate_specular:1;
|
||||||
GLuint fog_mode:2; /**< FOG_x */
|
GLuint fog_mode:2; /**< FOG_x */
|
||||||
GLuint inputs_available:12;
|
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);
|
format = _mesa_texture_base_format(texObj);
|
||||||
|
|
||||||
key->unit[i].enabled = 1;
|
key->unit[i].enabled = 1;
|
||||||
key->enabled_units |= (1<<i);
|
|
||||||
key->nr_enabled_units = i + 1;
|
key->nr_enabled_units = i + 1;
|
||||||
inputs_referenced |= VARYING_BIT_TEX(i);
|
inputs_referenced |= VARYING_BIT_TEX(i);
|
||||||
|
|
||||||
|
|
@ -1136,7 +1134,7 @@ emit_instructions(texenv_fragment_program *p)
|
||||||
struct state_key *key = p->state;
|
struct state_key *key = p->state;
|
||||||
GLuint unit;
|
GLuint unit;
|
||||||
|
|
||||||
if (key->enabled_units) {
|
if (key->nr_enabled_units) {
|
||||||
/* First pass - to support texture_env_crossbar, first identify
|
/* First pass - to support texture_env_crossbar, first identify
|
||||||
* all referenced texture sources and emit texld instructions
|
* all referenced texture sources and emit texld instructions
|
||||||
* for each:
|
* for each:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue