Lines Matching refs:unit
78 /* per-unit state */
132 _mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
134 const struct gl_fixedfunc_texture_unit *texUnit = ctx->Texture.FixedFuncUnit + unit;
135 printf("Texture Unit %d\n", unit);
170 * texture unit.
521 * Examine texture unit's combine/env state to update derived state.
621 GLuint unit;
624 for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) {
626 &ctx->Texture.FixedFuncUnit[unit];
630 if (!(ctx->Texture._EnabledCoordUnits & (1 << unit)))
647 ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit);
651 assert(unit < ARRAY_SIZE(ctx->TextureMatrixStack));
652 if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY)
653 ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit);
659 int unit)
666 texUnit = &ctx->Texture.Unit[unit];
668 /* Note: If more than one bit was set in TexturesUsed[unit], then we should
673 * pointing to the same texture image unit within a program
678 target_index = ffs(prog->TexturesUsed[unit]) - 1;
716 int unit,
721 texObj = update_single_program_texture(ctx, prog, unit);
723 _mesa_reference_texobj(&ctx->Texture.Unit[unit]._Current, texObj);
724 BITSET_SET(enabled_texture_units, unit);
726 MAX2(ctx->Texture._MaxEnabledTexImageUnit, (int)unit);
762 update_single_program_texture_state(ctx, prog[i], sampler->unit,
780 int unit;
782 for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
783 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
785 &ctx->Texture.FixedFuncUnit[unit];
793 * unit, just go along with it.
795 if (BITSET_TEST(enabled_texture_units, unit))
817 * "If a texture unit is disabled or has an invalid or incomplete
819 * is disabled for that texture unit. If the texture environment
820 * for a given enabled texture unit references a disabled texture
821 * unit, or an invalid or incomplete texture that is bound to
822 * another unit, then the results of texture blending are
848 /* if we get here, we know this texture unit is enabled */
849 BITSET_SET(enabled_texture_units, unit);
851 MAX2(ctx->Texture._MaxEnabledTexImageUnit, (int)unit);
853 ctx->Texture._EnabledCoordUnits |= 1 << unit;
868 const int unit = prog->SamplerUnits[s];
869 const gl_texture_index target_index = ffs(prog->TexturesUsed[unit]) - 1;
871 if (!ctx->Texture.Unit[unit]._Current) {
874 _mesa_reference_texobj(&ctx->Texture.Unit[unit]._Current, texObj);
875 BITSET_SET(enabled_texture_units, unit);
877 MAX2(ctx->Texture._MaxEnabledTexImageUnit, (int)unit);