summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-15 22:10:43 +0100
committerMarek Olšák <[email protected]>2018-02-13 01:00:45 +0100
commit78043a75f6c05c470da97d1f18615821d69177c0 (patch)
tree041ebf7ab6e8faf5c406913f22fd51533018c8a5 /src/mesa/main/texstate.c
parent07c10cc59c164ddd0109e061dac8edf47437d8ca (diff)
mesa: decrease the array size of ctx->Texture.FixedFuncUnit to 8
GL allows doing glTexEnv on 192 texture units, while in reality, only MaxTextureCoordUnits units are used by fixed-func shaders. There is a piglit patch that adjusts piglits/texunits to check only MaxTextureCoordUnits units. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 2b05630e619..f9f50a30054 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -103,7 +103,7 @@ _mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst )
}
}
- for (u = 0; u < src->Const.MaxCombinedTextureImageUnits; u++) {
+ for (u = 0; u < src->Const.MaxTextureCoordUnits; u++) {
dst->Texture.FixedFuncUnit[u].Enabled = src->Texture.FixedFuncUnit[u].Enabled;
dst->Texture.FixedFuncUnit[u].EnvMode = src->Texture.FixedFuncUnit[u].EnvMode;
COPY_4V(dst->Texture.FixedFuncUnit[u].EnvColor, src->Texture.FixedFuncUnit[u].EnvColor);