summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-15 22:02:51 +0100
committerMarek Olšák <[email protected]>2018-02-13 01:00:45 +0100
commit07c10cc59c164ddd0109e061dac8edf47437d8ca (patch)
treead38e5e0408a4fe07fb41a77b0bacef2e19a7100 /src/mesa/drivers/common
parent79aca14f5f37de32140fb710970133c72886a0f2 (diff)
mesa: separate legacy stuff from gl_texture_unit into gl_fixedfunc_texture_unit
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/meta.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index a7dd139500f..cd898e26f6f 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -631,14 +631,14 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
GLuint u, tgt;
save->ActiveUnit = ctx->Texture.CurrentUnit;
- save->EnvMode = ctx->Texture.Unit[0].EnvMode;
+ save->EnvMode = ctx->Texture.FixedFuncUnit[0].EnvMode;
/* Disable all texture units */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- save->TexEnabled[u] = ctx->Texture.Unit[u].Enabled;
- save->TexGenEnabled[u] = ctx->Texture.Unit[u].TexGenEnabled;
- if (ctx->Texture.Unit[u].Enabled ||
- ctx->Texture.Unit[u].TexGenEnabled) {
+ save->TexEnabled[u] = ctx->Texture.FixedFuncUnit[u].Enabled;
+ save->TexGenEnabled[u] = ctx->Texture.FixedFuncUnit[u].TexGenEnabled;
+ if (ctx->Texture.FixedFuncUnit[u].Enabled ||
+ ctx->Texture.FixedFuncUnit[u].TexGenEnabled) {
_mesa_ActiveTexture(GL_TEXTURE0 + u);
_mesa_set_enable(ctx, GL_TEXTURE_2D, GL_FALSE);
if (ctx->Extensions.ARB_texture_cube_map)
@@ -1065,14 +1065,14 @@ _mesa_meta_end(struct gl_context *ctx)
/* Restore fixed function texture enables, texgen */
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- if (ctx->Texture.Unit[u].Enabled != save->TexEnabled[u]) {
+ if (ctx->Texture.FixedFuncUnit[u].Enabled != save->TexEnabled[u]) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- ctx->Texture.Unit[u].Enabled = save->TexEnabled[u];
+ ctx->Texture.FixedFuncUnit[u].Enabled = save->TexEnabled[u];
}
- if (ctx->Texture.Unit[u].TexGenEnabled != save->TexGenEnabled[u]) {
+ if (ctx->Texture.FixedFuncUnit[u].TexGenEnabled != save->TexGenEnabled[u]) {
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
- ctx->Texture.Unit[u].TexGenEnabled = save->TexGenEnabled[u];
+ ctx->Texture.FixedFuncUnit[u].TexGenEnabled = save->TexGenEnabled[u];
}
}