From: Keith W. <ke...@va...> - 2001-03-13 17:14:33
|
Gareth Hughes wrote: > > Josh Vanderhoof wrote: > > > > I'm getting sidetracked here but: > > > > 1. Before you start doing crazy optimizations why wouldn't you rewrite > > it like this (get rid of the "dma.space" variable): > > > > void foo_Vertex3fv( const GLfloat *v ) > > { > > GET_FOO_CONTEXT(fmesa); > > COPY_3V( fmesa->current.o3n3t2.obj, v ); > > if ( fmesa->dma.head + 8 <= fmesa->dma.end_of_space ) { > > COPY_DWORDS( fmesa->dma.head, fmesa->current.o3n3tc2, 8 ); > > fmesa->dma.head += 8; > > } else { > > fmesa->get_dma( fmesa, fmesa->current.o3n3tc2, 8 ); > > } > > } > > Sure -- it was just a cut and paste of some old code Keith sent me. > Minor point. Historically it's because it is fmesa->dma->head not fmesa->dma.head. It's an ugliness that was built into the drivers early on. Keith |