diff options
author | Brian Paul <[email protected]> | 2006-04-14 02:20:18 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-04-14 02:20:18 +0000 |
commit | ee4e75bd6f768b7210436feeb32b4545ed62e025 (patch) | |
tree | 2684654e69d43aa244fc6082717523da202aa43e /src/mesa/tnl | |
parent | 1d886a81add08536f18d2453ae38fcac79f0b806 (diff) |
Replace ctx->Const.MaxTextureUnits w/ ctx->Const.MaxTexture[Coord/Image]Units
in various places.
Note that ctx->Texture.CurrentUnit needs to be tested against Coord/Image
limits when referenced, not just in glActiveTexture().
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_arbprogram.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_arbshader.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_program.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 8ceca29c254..36ea54296ce 100644 --- a/src/mesa/tnl/t_array_api.c +++ b/src/mesa/tnl/t_array_api.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.5 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -399,7 +399,7 @@ void _tnl_array_init( GLcontext *ctx ) _mesa_vector4f_init( &tmp->FogCoord, 0, NULL); _mesa_vector4f_init( &tmp->Index, 0, NULL); - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) _mesa_vector4f_init( &tmp->TexCoord[i], 0, NULL); } diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 1f492b6beb1..9fa53e2d5b3 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -1394,7 +1394,7 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage) VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &m->attribs[VERT_RESULT_PSIZ]; } - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { if (outputs & (1<<(VERT_RESULT_TEX0+i))) { VB->TexCoordPtr[i] = &m->attribs[VERT_RESULT_TEX0 + i]; VB->AttribPtr[VERT_ATTRIB_TEX0+i] = VB->TexCoordPtr[i]; diff --git a/src/mesa/tnl/t_vb_arbshader.c b/src/mesa/tnl/t_vb_arbshader.c index b1d024e0cca..d33389e514f 100644 --- a/src/mesa/tnl/t_vb_arbshader.c +++ b/src/mesa/tnl/t_vb_arbshader.c @@ -231,7 +231,7 @@ static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag vb->ClipPtr->count = vb->Count;
vb->ColorPtr[0] = &store->outputs[VERT_RESULT_COL0];
vb->SecondaryColorPtr[0] = &store->outputs[VERT_RESULT_COL1];
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
+ for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++)
vb->TexCoordPtr[i] = &store->outputs[VERT_RESULT_TEX0 + i];
vb->ColorPtr[1] = &store->outputs[VERT_RESULT_BFC0];
vb->SecondaryColorPtr[1] = &store->outputs[VERT_RESULT_BFC1];
@@ -243,7 +243,7 @@ static GLboolean run_arb_vertex_shader (GLcontext *ctx, struct tnl_pipeline_stag vb->AttribPtr[VERT_ATTRIB_COLOR0] = vb->ColorPtr[0];
vb->AttribPtr[VERT_ATTRIB_COLOR1] = vb->SecondaryColorPtr[0];
vb->AttribPtr[VERT_ATTRIB_FOG] = vb->FogCoordPtr;
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
+ for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++)
vb->AttribPtr[VERT_ATTRIB_TEX0 + i] = vb->TexCoordPtr[i];
vb->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->outputs[VERT_RESULT_PSIZ];
for (i = 0; i < MAX_VARYING_VECTORS; i++)
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 13db40aa603..7a98db85fdc 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -165,7 +165,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) VB->AttribPtr[VERT_ATTRIB_FOG] = VB->FogCoordPtr; VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->attribs[VERT_RESULT_PSIZ]; - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { VB->AttribPtr[VERT_ATTRIB_TEX0+i] = VB->TexCoordPtr[i] = &store->attribs[VERT_RESULT_TEX0 + i]; } |