Dnia poniedziaƂek, 29 czerwca 2009 o 12:24:54 Keith Whitwell napisaƂ(a):
> On Sat, 2009-06-27 at 14:57 -0700, Maciej Cencora wrote:
> > Hi,
> >
> > while playing with r300 driver I've stumbled upon a problem with
> > splitting vertexes.
> >
> > Let's say we get rendering operation where number of indexes in index
> > buffer is 80000 and max_index is 20000. We are calling vbo_split_prims
> > because number of indexes exceeds hw limit.
> > In flush_vertex (vbo_split_inplace.c) function the split->ib is not null,
> > so the max_index (20000) won't be changed. In the end the draw_prims
> > functions will be called with inappropriate max_index number.
> >
> > I'm seeing this behaviour with UT2004 demo on current r300 driver.
> >
> > I think the solution would be to always calculate min/max_index numbers
> > just like in the !split->ib path but I want to be sure before I commit
> > the patch.
>
> This seems reasonable to me - I haven't looked at this in a while
> though, and suspect this might be just one of several niggles in this
> code.
>
> Keith

There is one more (even bigger) problem with the vbo_split_inplace code. The 
behavior is completely bogus when there's an index buffer, because in flush 
function we don't use index buffer at all. For cases when max_index >= ib-
>count we end with incorrect rendering in the worst case, for max_index < ib-
>count we end with GPU trying to read outside of VBOs resulting in GPU lockup.
I've tried to come up with a proper solution but failed. I'd really appreciate 
if someone could take a look at this.

Regards,
Maciej Cencora

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to