Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-13 Thread Keith Whitwell
On Sat, Mar 13, 2010 at 4:33 AM, Luca Barbieri luca.barbi...@gmail.com wrote: Actually, why is the state tracker doing the min/max computation at all? If the driver does the index lookup itself, as opposed to using an hardware index buffer, (e.g. the nouveau drivers do this in some cases)

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-13 Thread Luca Barbieri
But for any such technique, the mesa state tracker will need to figure out what memory is being referred to by those non-VBO vertex buffers and to do that requires knowing the index min/max values. Isn't the min/max value only required to compute a sensible value for the maximum user buffer

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-13 Thread Keith Whitwell
On Sat, Mar 13, 2010 at 11:40 AM, Luca Barbieri luca.barbi...@gmail.com wrote: But for any such technique, the mesa state tracker will need to figure out what memory is being referred to by those non-VBO vertex buffers and to do that requires knowing the index min/max values. Isn't the

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-13 Thread Corbin Simpson
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

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-12 Thread Keith Whitwell
On Fri, 2010-03-12 at 02:54 -0800, Corbin Simpson wrote: Module: Mesa Branch: master Commit: 50876ddaaff72a324ac45e255985e0f84e108594 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50876ddaaff72a324ac45e255985e0f84e108594 Author: Corbin Simpson mostawesomed...@gmail.com Date:

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-12 Thread Keith Whitwell
Resending to the right address. Keith On Fri, 2010-03-12 at 13:40 +, Keith Whitwell wrote: On Fri, 2010-03-12 at 02:54 -0800, Corbin Simpson wrote: Module: Mesa Branch: master Commit: 50876ddaaff72a324ac45e255985e0f84e108594 URL:

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-12 Thread Brian Paul
The overriding goal is to avoid the expense of computing this in software when the hardware can do the bounds check. I guess we could add a PIPE_CAP query to ask the driver if it can do bounds checking and if it can't, do it in the state tracker. But I think Keith's interested in minimizing

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-12 Thread Luca Barbieri
Isn't it possible to compute the maximum legal index by just taking the minimum of: (vb-buffer-size - vb-buffer_offset - ve-src_offset) / vb-stride over all vertex buffers/elements? Isn't the kernel checker doing something like this?

Re: [Mesa3d-dev] Mesa (master): st/mesa: Always recalculate invalid index bounds.

2010-03-12 Thread Luca Barbieri
Actually, why is the state tracker doing the min/max computation at all? If the driver does the index lookup itself, as opposed to using an hardware index buffer, (e.g. the nouveau drivers do this in some cases) this is unnecessary and slow. Would completely removing the call to