summaryrefslogtreecommitdiff
path: root/src/mesa/array_cache
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-01-14 04:55:45 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-01-14 04:55:45 +0000
commit610d59981a9f43fefe29b34ef19c184d28e2bef5 (patch)
tree6bac42c2fd25b19ed35260538c6d945de8d699d8 /src/mesa/array_cache
parentcf01d97dc3e23af067dd9633a2bfa61a6a794ce6 (diff)
First batch of code for GL_NV_fragment_program.
Re-org of some GL_NV_vertex_program code. Replace MAX_TEXTURE_UNITS with MAX_TEXTURE_COORD_UNITS and MAX_TEXTURE_IMAGE_UNITS.
Diffstat (limited to 'src/mesa/array_cache')
-rw-r--r--src/mesa/array_cache/ac_context.c12
-rw-r--r--src/mesa/array_cache/ac_context.h10
-rw-r--r--src/mesa/array_cache/ac_import.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/array_cache/ac_context.c b/src/mesa/array_cache/ac_context.c
index 03532e6260..a09a55cd53 100644
--- a/src/mesa/array_cache/ac_context.c
+++ b/src/mesa/array_cache/ac_context.c
@@ -1,8 +1,8 @@
-/* $Id: ac_context.c,v 1.9 2002/10/29 20:28:58 brianp Exp $ */
+/* $Id: ac_context.c,v 1.10 2003/01/14 04:55:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -91,7 +91,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
- for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) {
+ for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) {
cl = &ac->Fallback.TexCoord[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
@@ -188,7 +188,7 @@ static void _ac_cache_init( GLcontext *ctx )
cl->Enabled = 1;
cl->Flags = 0;
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
cl = &ac->Cache.TexCoord[i];
cl->Size = 4;
cl->Type = GL_FLOAT;
@@ -254,7 +254,7 @@ static void _ac_raw_init( GLcontext *ctx )
ac->IsCached.SecondaryColor = GL_FALSE;
ac->IsCached.Vertex = GL_FALSE;
- for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) {
+ for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) {
ac->Raw.TexCoord[i] = ac->Fallback.TexCoord[i];
ac->IsCached.TexCoord[i] = GL_FALSE;
}
@@ -291,7 +291,7 @@ void _ac_DestroyContext( GLcontext *ctx )
if (ac->Cache.Index.Ptr) FREE( ac->Cache.Index.Ptr );
if (ac->Cache.FogCoord.Ptr) FREE( ac->Cache.FogCoord.Ptr );
- for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
if (ac->Cache.TexCoord[i].Ptr)
FREE( ac->Cache.TexCoord[i].Ptr );
}
diff --git a/src/mesa/array_cache/ac_context.h b/src/mesa/array_cache/ac_context.h
index 6b3e1a409c..fbc90743e3 100644
--- a/src/mesa/array_cache/ac_context.h
+++ b/src/mesa/array_cache/ac_context.h
@@ -1,8 +1,8 @@
-/* $Id: ac_context.h,v 1.5 2002/10/29 20:28:58 brianp Exp $ */
+/* $Id: ac_context.h,v 1.6 2003/01/14 04:55:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@@ -45,7 +45,7 @@ struct ac_arrays {
struct gl_client_array SecondaryColor;
struct gl_client_array FogCoord;
struct gl_client_array Index;
- struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
+ struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS];
struct gl_client_array EdgeFlag;
struct gl_client_array Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
@@ -57,7 +57,7 @@ struct ac_array_pointers {
struct gl_client_array *SecondaryColor;
struct gl_client_array *FogCoord;
struct gl_client_array *Index;
- struct gl_client_array *TexCoord[MAX_TEXTURE_UNITS];
+ struct gl_client_array *TexCoord[MAX_TEXTURE_COORD_UNITS];
struct gl_client_array *EdgeFlag;
struct gl_client_array *Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
@@ -69,7 +69,7 @@ struct ac_array_flags {
GLboolean SecondaryColor;
GLboolean FogCoord;
GLboolean Index;
- GLboolean TexCoord[MAX_TEXTURE_UNITS];
+ GLboolean TexCoord[MAX_TEXTURE_COORD_UNITS];
GLboolean EdgeFlag;
GLboolean Attrib[VERT_ATTRIB_MAX]; /* GL_NV_vertex_program */
};
diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c
index 1715e432ae..f8b92a4ee5 100644
--- a/src/mesa/array_cache/ac_import.c
+++ b/src/mesa/array_cache/ac_import.c
@@ -1,4 +1,4 @@
-/* $Id: ac_import.c,v 1.21 2002/10/29 20:28:58 brianp Exp $ */
+/* $Id: ac_import.c,v 1.22 2003/01/14 04:55:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -214,7 +214,7 @@ static void reset_attrib( GLcontext *ctx, GLuint index )
}
else if (index >= VERT_ATTRIB_TEX0 && index <= VERT_ATTRIB_TEX7) {
GLuint unit = index - VERT_ATTRIB_TEX0;
- ASSERT(unit < MAX_TEXTURE_UNITS);
+ ASSERT(unit < MAX_TEXTURE_COORD_UNITS);
ac->Raw.Attrib[index] = ctx->Array.TexCoord[unit];
}
else {