[Mesa-dev] [PATCH 1/2] st/mesa: fix max_offset computation for base vertex

Brian Paul brianp at vmware.com
Thu Apr 5 15:53:21 PDT 2012


On 04/03/2012 01:36 PM, Marek Olšák wrote:
> On Tue, Apr 3, 2012 at 6:13 PM, Brian Paul<brianp at 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


More information about the mesa-dev mailing list