diff options
author | Keith Whitwell <[email protected]> | 2004-01-06 00:18:03 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2004-01-06 00:18:03 +0000 |
commit | 44d4a8f64521fe9d398ecca5dc886171d8a40a7e (patch) | |
tree | 5e5049e8878763575e3c50b42903ebea76ecb2e4 /src/mesa/tnl | |
parent | 10095c9024efb1767fb3df0b59672299c090ad10 (diff) |
Apply attribute offset when calling extract().
Simplify stride calcs.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_vertex.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index c8cfb6e1065..8ae8e746488 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -681,7 +681,7 @@ static void generic_emit( GLcontext *ctx, for (j = 0; j < count; j++) { GLvector4f *vptr = VB->AttribPtr[a[j].attrib]; a[j].inputstride = vptr->stride; - a[j].inputptr = (GLubyte *)STRIDE_4F(vptr->data, start * vptr->stride); + a[j].inputptr = ((GLubyte *)vptr->data) + start * vptr->stride; a[j].emit = a[j].insert[vptr->size - 1]; } @@ -921,7 +921,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin, for (j = 0; j < attr_count; j++) { if (a[j].attrib == attr) { - a[j].extract( &a[j], dest, vin ); + a[j].extract( &a[j], dest, (GLubyte *)vin + a[j].vertoffset ); return; } } @@ -979,6 +979,9 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map, else vtx->attr[i].vertoffset = offset; +/* fprintf(stderr, "%d: %s offset %d\n", i, */ +/* format_info[format].name, vtx->attr[i].vertoffset); */ + offset += format_info[format].attrsize; } |