Home | History | Annotate | Download | only in main

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;
105 _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex],
106 src->Texture.Unit[u].CurrentTex[tex]);
107 if (src->Texture.Unit[u].CurrentTex[tex]) {
112 dst->Texture.Unit[u]._BoundTextures = src->Texture.Unit[u]._BoundTextures;
123 _mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
125 const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
126 printf("Texture Unit %d\n", unit);
161 * texture unit.
301 assert(k <= ARRAY_SIZE(ctx->Texture.Unit));
396 if (ctx->Texture.Unit[u]._Current &&
506 * Examine texture unit's combine/env state to update derived state.
604 GLuint unit;
607 for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) {
608 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
612 if (!(ctx->Texture._EnabledCoordUnits & (1 << unit)))
629 ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit);
633 assert(unit < ARRAY_SIZE(ctx->TextureMatrixStack));
634 if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY)
635 ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit);
641 int unit)
648 texUnit = &ctx->Texture.Unit[unit];
650 /* Note: If more than one bit was set in TexturesUsed[unit], then we should
655 * pointing to the same texture image unit within a program
660 target_index = ffs(prog->TexturesUsed[unit]) - 1;
696 int unit,
701 texObj = update_single_program_texture(ctx, prog, unit);
703 _mesa_reference_texobj(&ctx->Texture.Unit[unit]._Current, texObj);
704 BITSET_SET(enabled_texture_units, unit);
706 MAX2(ctx->Texture._MaxEnabledTexImageUnit, (int)unit);
742 update_single_program_texture_state(ctx, prog[i], sampler->unit,
760 int unit;
762 for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
763 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
771 * unit, just go along with it.
773 if (BITSET_TEST(enabled_texture_units, unit))
795 * "If a texture unit is disabled or has an invalid or incomplete
797 * is disabled for that texture unit. If the texture environment
798 * for a given enabled texture unit references a disabled texture
799 * unit, or an invalid or incomplete texture that is bound to
800 * another unit, then the results of texture blending are
824 /* if we get here, we know this texture unit is enabled */
825 BITSET_SET(enabled_texture_units, unit);
827 MAX2(ctx->Texture._MaxEnabledTexImageUnit, (int)unit);
829 ctx->Texture._EnabledCoordUnits |= 1 << unit;
844 const int unit = prog->SamplerUnits[s];
845 const gl_texture_index target_index = ffs(prog->TexturesUsed[unit]) - 1;
847 if (!ctx->Texture.Unit[unit]._Current) {
850 _mesa_reference_texobj(&ctx->Texture.Unit[unit]._Current, texObj);
851 BITSET_SET(enabled_texture_units, unit);
853 MAX2(ctx->Texture._MaxEnabledTexImageUnit, (int)unit);
908 _mesa_reference_texobj(&ctx->Texture.Unit[i]._Current, NULL);
911 _mesa_reference_texobj(&ctx->Texture.Unit[i]._Current, NULL);
983 * Initialize a texture unit.
986 * \param unit texture unit number to be initialized.
989 init_texture_unit( struct gl_context *ctx, GLuint unit )
991 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
1059 for (u = 0; u < ARRAY_SIZE(ctx->Texture.Unit); u++)
1092 for (u = 0; u < ARRAY_SIZE(ctx->Texture.Unit); u++) {
1094 _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL);
1097 _mesa_reference_texobj(&ctx->Texture.Unit[u].CurrentTex[tgt], NULL);
1108 for (u = 0; u < ARRAY_SIZE(ctx->Texture.Unit); u++) {
1109 _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[u].Sampler, NULL);
1124 for (u = 0; u < ARRAY_SIZE(ctx->Texture.Unit); u++) {
1125 struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u];