summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_arbprogram.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2006-09-07 13:26:44 +0000
committerRoland Scheidegger <[email protected]>2006-09-07 13:26:44 +0000
commit28e7219b96e647ac59f6a28abf6d2aea3779dc47 (patch)
treed1445dc3a30bf1371007670ae5f1a012be082fad /src/mesa/tnl/t_vb_arbprogram.c
parentd016d4e70f518a0221d63eddca482d56398ffe35 (diff)
only allow VERT_ATTRIB_MAX instead of _TNL_ATTRIB_MAX for inputs of vertex programs (fixes a segfault since the result of the shift is undefined otherwise, and it may happen that _TNL_ATTRIB_POINTSIZE will be tried to read, unlike all other attribs this however may be unitialized (might be a bug in itself)).
Diffstat (limited to 'src/mesa/tnl/t_vb_arbprogram.c')
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c
index 411a2508573..f162b0aa910 100644
--- a/src/mesa/tnl/t_vb_arbprogram.c
+++ b/src/mesa/tnl/t_vb_arbprogram.c
@@ -1253,7 +1253,7 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage)
m->nr_inputs = m->nr_outputs = 0;
- for (i = 0; i < _TNL_ATTRIB_MAX; i++) {
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
if (program->Base.InputsRead & (1<<i) ||
(i == VERT_ATTRIB_POS && program->IsPositionInvariant)) {
GLuint j = m->nr_inputs++;