aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 8ac5db062fc..398ff653b73 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -374,8 +374,8 @@ _mesa_PushAttrib(GLbitfield mask)
attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne;
attr->SampleCoverage = ctx->Multisample.SampleCoverage;
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
- attr->Texture[i] = ctx->Texture.Unit[i].Enabled;
- attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled;
+ attr->Texture[i] = ctx->Texture.FixedFuncUnit[i].Enabled;
+ attr->TexGen[i] = ctx->Texture.FixedFuncUnit[i].TexGenEnabled;
}
/* GL_ARB_vertex_program */
attr->VertexProgram = ctx->VertexProgram.Enabled;
@@ -718,7 +718,7 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
const GLbitfield enabled = enable->Texture[i];
const GLbitfield genEnabled = enable->TexGen[i];
- if (ctx->Texture.Unit[i].Enabled != enabled) {
+ if (ctx->Texture.FixedFuncUnit[i].Enabled != enabled) {
_mesa_ActiveTexture(GL_TEXTURE0 + i);
_mesa_set_enable(ctx, GL_TEXTURE_1D, !!(enabled & TEXTURE_1D_BIT));
@@ -734,7 +734,7 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
}
}
- if (ctx->Texture.Unit[i].TexGenEnabled != genEnabled) {
+ if (ctx->Texture.FixedFuncUnit[i].TexGenEnabled != genEnabled) {
_mesa_ActiveTexture(GL_TEXTURE0 + i);
_mesa_set_enable(ctx, GL_TEXTURE_GEN_S, !!(genEnabled & S_BIT));
_mesa_set_enable(ctx, GL_TEXTURE_GEN_T, !!(genEnabled & T_BIT));
@@ -758,7 +758,8 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
_mesa_lock_context_textures(ctx);
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- const struct gl_texture_unit *unit = &texstate->Texture.Unit[u];
+ const struct gl_fixedfunc_texture_unit *unit =
+ &texstate->Texture.FixedFuncUnit[u];
GLuint tgt;
_mesa_ActiveTexture(GL_TEXTURE0_ARB + u);
@@ -785,7 +786,9 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
_mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->GenQ.ObjectPlane);
/* Eye plane done differently to avoid re-transformation */
{
- struct gl_texture_unit *destUnit = &ctx->Texture.Unit[u];
+ struct gl_fixedfunc_texture_unit *destUnit =
+ &ctx->Texture.FixedFuncUnit[u];
+
COPY_4FV(destUnit->GenS.EyePlane, unit->GenS.EyePlane);
COPY_4FV(destUnit->GenT.EyePlane, unit->GenT.EyePlane);
COPY_4FV(destUnit->GenR.EyePlane, unit->GenR.EyePlane);
@@ -802,7 +805,7 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
_mesa_set_enable(ctx, GL_TEXTURE_GEN_R, !!(unit->TexGenEnabled & R_BIT));
_mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, !!(unit->TexGenEnabled & Q_BIT));
_mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS,
- unit->LodBias);
+ texstate->Texture.Unit[u].LodBias);
_mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB,
unit->Combine.ModeRGB);
_mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA,