summaryrefslogtreecommitdiff
path: root/src/mesa/main/ffvertex_prog.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2008-12-31 11:54:02 -0700
committerBrian Paul <brianp@vmware.com>2008-12-31 12:00:17 -0700
commite9b34885b8ff2ccb67a801cd1ce07e0df1b0e397 (patch)
tree588afee46d734cba7e002fdc01cfc588a999f52e /src/mesa/main/ffvertex_prog.c
parentbfebeffc0045266d354a36968336337e099a9f27 (diff)
mesa: increase max texture image units and GLSL samplers to 16
The max texture coord units is still 8. All the fixed-function paths are still limited to 8 too. But GLSL shaders can use more samplers now. Note that some texcoord-related data structures are declared to be 16 elements in size rather than 8. This just simplifies the code in a few places; the extra elements aren't accessible to the user. These changes haven't been extensively tested yet, but sanity checking has been done. It should be possible to increase the max image units/samplers to 32 without doing anything special. Beyond that we'll need longer bitfields in a few places.
Diffstat (limited to 'src/mesa/main/ffvertex_prog.c')
-rw-r--r--src/mesa/main/ffvertex_prog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index ebc02940de..9021931b35 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -275,7 +275,7 @@ static void make_state_key( GLcontext *ctx, struct state_key *key )
ctx->Texture._EnabledUnits)
key->texture_enabled_global = 1;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
if (texUnit->_ReallyEnabled)
@@ -1451,7 +1451,7 @@ static void build_texture_transform( struct tnl_program *p )
{
GLuint i, j;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
if (!(p->state->fragprog_inputs_read & FRAG_BIT_TEX(i)))
continue;