diff options
author | Eric Anholt <[email protected]> | 2014-04-23 15:30:27 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-04-30 14:33:17 -0700 |
commit | c703658b3965bf2e4f3593a0d54be03e8e8b1436 (patch) | |
tree | b5b6b201cbc4816dec9b6f51c0da3570b50585a3 /src/mesa/drivers/dri/nouveau | |
parent | 3dfe56c53bc7f37b65b72408fe3470ecfd218595 (diff) |
mesa: Drop _EnabledUnits.
The field wasn't really valid, since we've got more than 32 units now. It
turns out it was mostly just used for checking != 0, or checking for fixed
function coordinates, though.
v2: Fix mis-conversion in xm_line.c (caught by Ken).
Reviewed-by: Matt Turner <[email protected]> (v1)
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_frag.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c index 17d27814063..c48a0b0d566 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c @@ -286,7 +286,7 @@ nv04_emit_tex_env(struct gl_context *ctx, int emit) /* calculate non-multitex state */ nv04->blend &= ~NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP__MASK; - if (ctx->Texture._EnabledUnits) + if (ctx->Texture._MaxEnabledTexImageUnit != -1) nv04->blend |= get_texenv_mode(ctx->Texture.Unit[0].EnvMode); else nv04->blend |= get_texenv_mode(GL_MODULATE); diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c index 10f067fdec1..aa7e703842a 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c @@ -353,7 +353,7 @@ nv10_get_final_combiner(struct gl_context *ctx, uint64_t *in, int *n) INPUT_ONE(&rc, E, 0); } - if (ctx->Texture._EnabledUnits) { + if (ctx->Texture._MaxEnabledTexImageUnit != -1) { INPUT_SRC(&rc, B, SPARE0, RGB); INPUT_SRC(&rc, G, SPARE0, ALPHA); } else { @@ -362,7 +362,7 @@ nv10_get_final_combiner(struct gl_context *ctx, uint64_t *in, int *n) } *in = rc.in; - *n = log2i(ctx->Texture._EnabledUnits) + 1; + *n = ctx->Texture._MaxEnabledTexImageUnit + 1; } void |