summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-10-10 21:54:34 +0000
committerKeith Whitwell <[email protected]>2003-10-10 21:54:34 +0000
commite01f56b3a85d1ca7ee19f1787305bb5986e16c39 (patch)
tree0e14a54c9af03613a5961888d5b8f52eb8717b4c
parent30cd200068d5f671b3167f4400c409578e24ecb6 (diff)
Solve the gears glitches.
-rw-r--r--src/mesa/tnl/t_save_api.c2
-rw-r--r--src/mesa/tnl/t_vtx_api.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index f72cde2fe4a..0f54f6583b8 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -485,7 +485,7 @@ static void _save_upgrade_vertex( GLcontext *ctx,
}
}
- tnl->save.buffer = dest;
+ tnl->save.vbptr = dest;
tnl->save.counter -= tnl->save.copied.nr;
}
}
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c
index 3f693553c66..253c8560f50 100644
--- a/src/mesa/tnl/t_vtx_api.c
+++ b/src/mesa/tnl/t_vtx_api.c
@@ -215,29 +215,29 @@ static void _tnl_wrap_upgrade_vertex( GLcontext *ctx,
if (tnl->vtx.copied.nr)
{
GLfloat *data = tnl->vtx.copied.buffer;
- GLfloat *tmp = tnl->vtx.buffer;
+ GLfloat *dest = tnl->vtx.buffer;
GLuint j;
for (i = 0 ; i < tnl->vtx.copied.nr ; i++) {
- for (j = 1 ; j < _TNL_ATTRIB_MAX ; j++) {
+ for (j = 0 ; j < _TNL_ATTRIB_MAX ; j++) {
if (tnl->vtx.attrsz[j]) {
if (j == attr) {
- COPY_SZ_4V( tmp, newsz, tnl->vtx.current[attr] );
- COPY_SZ_4V( tmp, oldsz, data );
+ COPY_SZ_4V( dest, newsz, tnl->vtx.current[j] );
+ COPY_SZ_4V( dest, oldsz, data );
data += oldsz;
- tmp += newsz;
+ dest += newsz;
}
else {
GLuint sz = tnl->vtx.attrsz[j];
- COPY_SZ_4V( tmp, sz, data );
- tmp += sz;
+ COPY_SZ_4V( dest, sz, data );
+ dest += sz;
data += sz;
}
}
}
}
- tnl->vtx.vbptr = tmp;
+ tnl->vtx.vbptr = dest;
tnl->vtx.counter -= tnl->vtx.copied.nr;
tnl->vtx.copied.nr = 0;
}