summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vtx_api.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-04-20 10:28:15 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-04-20 10:28:15 +0000
commit319f5fd5ec85b4ca845028e6cdb94cca0a00d3d5 (patch)
tree9fa54545bc4a9adbc718e134bc61450cd2ddb299 /src/mesa/tnl/t_vtx_api.c
parent30a8a0b8fa9e66efb97aef630765e4cdf6d9cb68 (diff)
Simplify last fix slightly, apply to vtx paths as well.
Diffstat (limited to 'src/mesa/tnl/t_vtx_api.c')
-rw-r--r--src/mesa/tnl/t_vtx_api.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c
index 52036aa996..7eccacc504 100644
--- a/src/mesa/tnl/t_vtx_api.c
+++ b/src/mesa/tnl/t_vtx_api.c
@@ -275,10 +275,15 @@ static void _tnl_wrap_upgrade_vertex( GLcontext *ctx,
for (j = 0 ; j < _TNL_ATTRIB_MAX ; j++) {
if (tnl->vtx.attrsz[j]) {
if (j == attr) {
- COPY_SZ_4V( dest, newsz, tnl->vtx.current[j] );
- COPY_SZ_4V( dest, oldsz, data );
- data += oldsz;
- dest += newsz;
+ if (oldsz) {
+ ASSIGN_4V( dest, 0, 0, 0, 1 );
+ COPY_SZ_4V( dest, oldsz, data );
+ data += oldsz;
+ dest += newsz;
+ } else {
+ COPY_SZ_4V( dest, newsz, tnl->vtx.current[j] );
+ dest += newsz;
+ }
}
else {
GLuint sz = tnl->vtx.attrsz[j];