summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
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/main/context.c
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/main/context.c')
-rw-r--r--src/mesa/main/context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7dbf67871dd..79d3e39e922 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1264,8 +1264,10 @@ _mesa_initialize_context(struct gl_context *ctx,
* GL_OES_texture_cube_map says
* "Initially all texture generation modes are set to REFLECTION_MAP_OES"
*/
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
+ for (i = 0; i < ARRAY_SIZE(ctx->Texture.FixedFuncUnit); i++) {
+ struct gl_fixedfunc_texture_unit *texUnit =
+ &ctx->Texture.FixedFuncUnit[i];
+
texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;