Lines Matching refs:Unit
79 /* per-unit state */
81 dst->Texture.Unit[u].Enabled = src->Texture.Unit[u].Enabled;
82 dst->Texture.Unit[u].EnvMode = src->Texture.Unit[u].EnvMode;
83 COPY_4V(dst->Texture.Unit[u].EnvColor, src->Texture.Unit[u].EnvColor);
84 dst->Texture.Unit[u].TexGenEnabled = src->Texture.Unit[u].TexGenEnabled;
85 dst->Texture.Unit[u].GenS = src->Texture.Unit[u].GenS;
86 dst->Texture.Unit[u].GenT = src->Texture.Unit[u].GenT;
87 dst->Texture.Unit[u].GenR = src->Texture.Unit[u].GenR;
88 dst->Texture.Unit[u].GenQ = src->Texture.Unit[u].GenQ;
89 dst->Texture.Unit[u].LodBias = src->Texture.Unit[u].LodBias;
92 dst->Texture.Unit[u].Combine = src->Texture.Unit[u].Combine;
95 dst->Texture.Unit[u].BumpTarget = src->Texture.Unit[u].BumpTarget;
96 COPY_4V(dst->Texture.Unit[u].RotMatrix, src->Texture.Unit[u].RotMatrix);
109 _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex],
110 src->Texture.Unit[u].CurrentTex[tex]);
122 _mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
124 const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
125 printf("Texture Unit %d\n", unit);
160 * texture unit.
299 ASSERT(k <= Elements(ctx->Texture.Unit));
377 if (ctx->Texture.Unit[u]._ReallyEnabled &&
386 * Examine texture unit's combine/env state to update derived state.
495 GLuint unit;
531 * Update texture unit state.
533 for (unit = 0; unit < ctx->Const.MaxCombinedTextureImageUnits; unit++) {
534 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
547 enabledVertTargets |= vprog->TexturesUsed[unit];
551 enabledFragTargets |= fprog->TexturesUsed[unit];
563 /* neither vertex nor fragment processing uses this unit */
606 /* invalid fallback texture: don't enable the texture unit */
614 /* fixed-function: texture unit is really disabled */
619 /* if we get here, we know this texture unit is enabled */
621 ctx->Texture._EnabledUnits |= (1 << unit);
624 enabledFragUnits |= (1 << unit);
641 for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) {
642 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
646 if (!(ctx->Texture._EnabledCoordUnits & (1 << unit)))
663 ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit);
667 ASSERT(unit < Elements(ctx->TextureMatrixStack));
668 if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY)
669 ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit);
742 * Initialize a texture unit.
745 * \param unit texture unit number to be initialized.
748 init_texture_unit( struct gl_context *ctx, GLuint unit )
750 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
804 for (u = 0; u < Elements(ctx->Texture.Unit); u++)
835 for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
837 _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL);
840 _mesa_reference_texobj(&ctx->Texture.Unit[u].CurrentTex[tgt], NULL);
852 for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
853 _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[u].Sampler, NULL);
869 for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
870 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u];