summaryrefslogtreecommitdiff
path: root/src/mesa/main/arrayobj.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/arrayobj.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/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 1461239317..f3f482f8c8 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -142,7 +142,7 @@ _mesa_initialize_array_object( GLcontext *ctx,
obj->Index.StrideB = 0;
obj->Index.Ptr = NULL;
obj->Index.Enabled = GL_FALSE;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
obj->TexCoord[i].Size = 4;
obj->TexCoord[i].Type = GL_FLOAT;
obj->TexCoord[i].Stride = 0;
@@ -181,7 +181,7 @@ _mesa_initialize_array_object( GLcontext *ctx,
obj->SecondaryColor.BufferObj = ctx->Array.NullBufferObj;
obj->FogCoord.BufferObj = ctx->Array.NullBufferObj;
obj->Index.BufferObj = ctx->Array.NullBufferObj;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
obj->TexCoord[i].BufferObj = ctx->Array.NullBufferObj;
}
obj->EdgeFlag.BufferObj = ctx->Array.NullBufferObj;
@@ -335,7 +335,7 @@ _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids)
unbind_buffer_object( ctx, obj->SecondaryColor.BufferObj );
unbind_buffer_object( ctx, obj->FogCoord.BufferObj );
unbind_buffer_object( ctx, obj->Index.BufferObj );
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
unbind_buffer_object( ctx, obj->TexCoord[i].BufferObj );
}
unbind_buffer_object( ctx, obj->EdgeFlag.BufferObj );