On 04/03/2012 01:36 PM, Marek Olšák wrote:
On Tue, Apr 3, 2012 at 6:13 PM, Brian Paul<bri...@vmware.com>  wrote:
Hi Brian,

the !new_array test should stay there, because redefine_user_buffer
should only be called if st_validate_varrays wasn't. If new_array is
TRUE, we call st_validate_varrays. If it's FALSE, we call
redefine_user_buffer. We shouldn't and don't need to call both.


That's not what I found.  To fix the piglit test in question we have to call
pipe->redefine_user_buffer() for both drawing calls since we're accessing
different ranges of user-space memory for the two calls.

IIRC, st_validate_varrays() is invoked for the second drawing call, but it
doesn't call pipe->redefine_user_buffer()

st_validate_varrays sets width0 of all user buffers to some initial
value (see all occurences of pipe_user_buffer_create).
redefine_user_buffer only updates it (no driver does anything else
than just updating width0). Therefore, st_validate_varrays sets a
wrong width0 and should be fixed in the same way like you fixed it for
redefine_user_buffer. Basically, the numbers we set in
pipe_user_buffer_create and redefine_user_buffer should lead to the
same width0.

OK, I think I've got it now.  I'll post a new patch shortly.

-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to