summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-05-22 07:30:05 -0600
committerBrian Paul <brianp@vmware.com>2009-05-22 07:30:05 -0600
commit882cd6c839e56a3eceb8edf62f83893f6b531d35 (patch)
tree54333649f98859136ec02f7ea0c9b2050fa5a42f /src/mesa/shader
parent4a95185c9f30c2de7a03bb1a0653f51b53b1111d (diff)
mesa: remove MAX_VERTEX_PROGRAM_ATTRIBS
Use MAX_VERTEX_GENERIC_ATTRIBS instead. No need for two #defines for the same quantity.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/arbprogparse.c14
-rw-r--r--src/mesa/shader/arbprogram.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 36267c336f..a90ce95a63 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -953,7 +953,7 @@ parse_generic_attrib_num(GLcontext *ctx, const GLubyte ** inst,
{
GLint i = parse_integer(inst, Program);
- if ((i < 0) || (i >= MAX_VERTEX_PROGRAM_ATTRIBS))
+ if ((i < 0) || (i >= MAX_VERTEX_GENERIC_ATTRIBS))
{
program_error(ctx, Program->Position,
"Invalid generic vertex attribute index");
@@ -1510,10 +1510,10 @@ generic_attrib_check(struct var_cache *vc_head)
{
int a;
struct var_cache *curr;
- GLboolean explicitAttrib[MAX_VERTEX_PROGRAM_ATTRIBS],
- genericAttrib[MAX_VERTEX_PROGRAM_ATTRIBS];
+ GLboolean explicitAttrib[MAX_VERTEX_GENERIC_ATTRIBS],
+ genericAttrib[MAX_VERTEX_GENERIC_ATTRIBS];
- for (a=0; a<MAX_VERTEX_PROGRAM_ATTRIBS; a++) {
+ for (a=0; a<MAX_VERTEX_GENERIC_ATTRIBS; a++) {
explicitAttrib[a] = GL_FALSE;
genericAttrib[a] = GL_FALSE;
}
@@ -1524,11 +1524,11 @@ generic_attrib_check(struct var_cache *vc_head)
if (curr->attrib_is_generic) {
GLuint attr = (curr->attrib_binding == 0)
? 0 : (curr->attrib_binding - VERT_ATTRIB_GENERIC0);
- assert(attr < MAX_VERTEX_PROGRAM_ATTRIBS);
+ assert(attr < MAX_VERTEX_GENERIC_ATTRIBS);
genericAttrib[attr] = GL_TRUE;
}
else {
- assert(curr->attrib_binding < MAX_VERTEX_PROGRAM_ATTRIBS);
+ assert(curr->attrib_binding < MAX_VERTEX_GENERIC_ATTRIBS);
explicitAttrib[ curr->attrib_binding ] = GL_TRUE;
}
}
@@ -1536,7 +1536,7 @@ generic_attrib_check(struct var_cache *vc_head)
curr = curr->next;
}
- for (a=0; a<MAX_VERTEX_PROGRAM_ATTRIBS; a++) {
+ for (a=0; a<MAX_VERTEX_GENERIC_ATTRIBS; a++) {
if ((explicitAttrib[a]) && (genericAttrib[a]))
return 1;
}
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 6f5a954c16..21c5cfbf99 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -310,7 +310,7 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (index >= MAX_VERTEX_PROGRAM_ATTRIBS) {
+ if (index >= MAX_VERTEX_GENERIC_ATTRIBS) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribfvARB(index)");
return;
}