[Mesa-dev] [PATCH 2/6] rbug: fix crash in set_vertex_buffers

Roland Scheidegger sroland at vmware.com
Mon Aug 18 17:00:23 PDT 2014


Am 19.08.2014 01:35, schrieb Marek Olšák:
> On Tue, Aug 19, 2014 at 1:10 AM, Roland Scheidegger <sroland at vmware.com> wrote:
>> Am 18.08.2014 23:24, schrieb Marek Olšák:
>>> From: Marek Olšák <marek.olsak at amd.com>
>>>
>>> ---
>>>  src/gallium/drivers/rbug/rbug_context.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
>>> index ca94590..d6fca2e 100644
>>> --- a/src/gallium/drivers/rbug/rbug_context.c
>>> +++ b/src/gallium/drivers/rbug/rbug_context.c
>>> @@ -758,7 +758,7 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
>>>
>>>     pipe_mutex_lock(rb_pipe->call_mutex);
>>>
>>> -   if (num_buffers) {
>>> +   if (num_buffers && _buffers) {
>>>        memcpy(unwrapped_buffers, _buffers, num_buffers * sizeof(*_buffers));
>>>        for (i = 0; i < num_buffers; i++)
>>>           unwrapped_buffers[i].buffer = rbug_resource_unwrap(_buffers[i].buffer);
>>>
>>
>> This looks to me like it still won't handle buffer updates not starting
>> from slot zero correctly.
> 
> It will. Start_slot doesn't affect the buffers array in any way.
> 
> Marek
> 

Ah right clearly I didn't look close enough.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>




More information about the mesa-dev mailing list