diff options
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/arbprogparse.c | 4 | ||||
-rw-r--r-- | src/mesa/shader/arbprogram.c | 9 | ||||
-rw-r--r-- | src/mesa/shader/nvvertexec.c | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index a7068e6dbc..f8809c576f 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5 * - * Copyright (C) 1999-2005 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"), @@ -856,7 +856,7 @@ parse_generic_attrib_num(GLcontext *ctx, GLubyte ** inst, { GLint i = parse_integer(inst, Program); - if ((i < 0) || (i > MAX_VERTEX_PROGRAM_ATTRIBS)) + if ((i < 0) || (i >= MAX_VERTEX_PROGRAM_ATTRIBS)) { _mesa_set_program_error (ctx, Program->Position, "Invalid generic vertex attribute index"); diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index a7b26e72b5..9cc5488b2b 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5 * - * Copyright (C) 1999-2005 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"), @@ -123,11 +123,8 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params) params[0] = ctx->Array.VertexAttrib[index].Normalized; break; case GL_CURRENT_VERTEX_ATTRIB_ARB: - FLUSH_CURRENT(ctx, 0); - /* XXX should read: - COPY_4V(params, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index]); - */ - COPY_4V(params, ctx->Current.Attrib[index]); + FLUSH_CURRENT(ctx, 0); + COPY_4V(params, ctx->Current.Attrib[VERT_ATTRIB_GENERIC0 + index]); break; case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB: if (!ctx->Extensions.ARB_vertex_buffer_object) { diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 0e0e459b28..fc5837812e 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.5 * - * Copyright (C) 1999-2005 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"), @@ -51,7 +51,7 @@ _mesa_init_vp_per_vertex_registers(GLcontext *ctx) { /* Input registers get initialized from the current vertex attribs */ MEMCPY(ctx->VertexProgram.Inputs, ctx->Current.Attrib, - VERT_ATTRIB_MAX * 4 * sizeof(GLfloat)); + MAX_VERTEX_PROGRAM_ATTRIBS * 4 * sizeof(GLfloat)); if (ctx->VertexProgram.Current->IsNVProgram) { GLuint i; |