summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2006-10-30 16:44:13 +0000
committerKeith Whitwell <[email protected]>2006-10-30 16:44:13 +0000
commit99efde461d3b8615863bdb7308e05289e0db0422 (patch)
tree95b9e3f4f612957a93547892f3559cfaa44dccb7 /src/mesa/vbo/vbo_exec_array.c
parentefef291dc71eb57f90785a26957f4b3e01733156 (diff)
better handling of current attributes. Trivial dlist and varray tests work
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 5cfa7a01a96..b3650e26978 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -107,7 +107,8 @@ static void bind_array_obj( GLcontext *ctx )
static void recalculate_input_bindings( GLcontext *ctx )
{
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
const struct gl_client_array **inputs = &exec->array.inputs[0];
GLuint i;
@@ -126,11 +127,11 @@ static void recalculate_input_bindings( GLcontext *ctx )
if (exec->array.legacy_array[i]->Enabled)
inputs[i] = exec->array.legacy_array[i];
else
- inputs[i] = &exec->legacy_currval[i];
+ inputs[i] = &vbo->legacy_currval[i];
}
for (i = 0; i < MAT_ATTRIB_MAX; i++) {
- inputs[VERT_ATTRIB_GENERIC0 + i] = &exec->mat_currval[i];
+ inputs[VERT_ATTRIB_GENERIC0 + i] = &vbo->mat_currval[i];
}
break;
case VP_NV:
@@ -144,7 +145,7 @@ static void recalculate_input_bindings( GLcontext *ctx )
else if (exec->array.legacy_array[i]->Enabled)
inputs[i] = exec->array.legacy_array[i];
else
- inputs[i] = &exec->legacy_currval[i];
+ inputs[i] = &vbo->legacy_currval[i];
}
break;
case VP_ARB:
@@ -160,21 +161,21 @@ static void recalculate_input_bindings( GLcontext *ctx )
else if (exec->array.legacy_array[0]->Enabled)
inputs[0] = exec->array.legacy_array[0];
else
- inputs[0] = &exec->legacy_currval[0];
+ inputs[0] = &vbo->legacy_currval[0];
for (i = 1; i <= VERT_ATTRIB_TEX7; i++) {
if (exec->array.legacy_array[i]->Enabled)
inputs[i] = exec->array.legacy_array[i];
else
- inputs[i] = &exec->legacy_currval[i];
+ inputs[i] = &vbo->legacy_currval[i];
}
for (i = 0; i < 16; i++) {
if (exec->array.generic_array[0]->Enabled)
inputs[VERT_ATTRIB_GENERIC0 + i] = exec->array.generic_array[i];
else
- inputs[VERT_ATTRIB_GENERIC0 + i] = &exec->generic_currval[i];
+ inputs[VERT_ATTRIB_GENERIC0 + i] = &vbo->generic_currval[i];
}
break;
}