[Mesa-dev] [Mesa3d-dev] r300g: hack around issue with doom3 and 0 stride
Zack Rusin
zackr at vmware.com
Sat Apr 10 16:27:52 PDT 2010
On Saturday 10 April 2010 18:44:27 Luca Barbieri wrote:
> > r300g: hack around issue with doom3 and 0 stride
> >
> > This is most likely a bug in the mesa state tracker, but do the quick
> > hack for now to avoid the divide by 0.
>
> This is not a bug: stride 0 means that the vertex attribute is
> constant for all vertices.
Right, it's how our vbo code handles cases like
glBegin(primitive);
glColor4f(...);
glVertex(...);
glVertex(...);
glVertex(...);
glEnd();
> Thus, the patch is not likely to be correct: you should instead either
> program stride 0 to the hardware if supported, or fetch the vertex
> attribute with the CPU
Dave, jfyi, i implemented this a long time ago in svga, just search for
zero_stride in there (svga_hw_update_zero_stride in particular), you should be
able to almost simply copy&paste that code.
z
More information about the mesa-dev
mailing list