On Fri, Mar 12, 2010 at 6:53 PM, Roland Scheidegger <srol...@vmware.com> wrote:
> On 13.03.2010 03:20, Corbin Simpson wrote:
>> I've pushed a revert of the original patch, and an r300g patch that,
>> while not perfect, covers the common case that Wine hits.
>
> I think I don't really understand that (and the fix you did for r300g).
> Why can't you simply clamp the maxIndex to the minimum of the submitted
> maxIndex and the vertex buffer max index?
>
> Now you have this:
> maxIndex = MIN3(maxIndex, r300->vertex_buffer_max_index, count - minIndex);
>
> This is then used to set the hardware max index clamp. However, for
> example count could be 3, min index 0, but the actual vertices fetched
> 0, 15, 30 - as long as the vertex buffers are large enough this is
> perfectly legal, but as far as I can tell your patch would force the
> hardware to just fetch the 0th vertex (3 times). Count really tells you
> nothing at all about the index range (would also be legal to have huge
> count but very small valid index range if you fetch same vertices
> repeatedly).

That's why I said that it's not perfect. :3

r300->vertex_buffer_max_index is, on this particular rendering path,
*also* bogus, which is too bad because it should be used instead of
maxIndex/minIndex here. But, as I said before, if it's too big then it
can't be used, and we need to err on the side of caution if we err at
all. One misrendered draw call is better than dropping the entire
packet of commands on the floor.

-- 
Only fools are easily impressed by what is only
barely beyond their reach. ~ Unknown

Corbin Simpson
<mostawesomed...@gmail.com>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to