[Mesa-dev] [Mesa3d-dev] r300g: hack around issue with doom3 and 0 stride

Zack Rusin zackr at vmware.com
Sat Apr 10 22:13:24 PDT 2010


On Saturday 10 April 2010 22:43:40 Dave Airlie wrote:
> On Sun, Apr 11, 2010 at 9:27 AM, Zack Rusin <zackr at vmware.com> wrote:

Small typo:

> > glColor4f(...);
> > glBegin(primitive);
> > 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.
> 
> Wierdly we've never hit this divide by zero with any piglit test or any
>  games except doom3, 

Either because you're ignoring/skipping the tests or were just lucky. Try 
glsl-vs-loop test in piglit, you'll notice the zero-stride buffer there.

z


More information about the mesa-dev mailing list