On Tue, Jan 26, 2016 at 3:53 PM, Samuel Pitoiset
<samuel.pitoi...@gmail.com> wrote:
>
>
> On 01/25/2016 08:07 PM, Marek Olšák wrote:
>>
>> On Sun, Jan 24, 2016 at 4:47 PM, Samuel Pitoiset
>> <samuel.pitoi...@gmail.com> wrote:
>>>
>>> Like other resources, the indirect draw buffer must be unwrapped.
>>>
>>> Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
>>> ---
>>>   src/gallium/drivers/trace/tr_context.c | 15 ++++++++++++++-
>>>   1 file changed, 14 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/gallium/drivers/trace/tr_context.c
>>> b/src/gallium/drivers/trace/tr_context.c
>>> index 5017669..56e7818 100644
>>> --- a/src/gallium/drivers/trace/tr_context.c
>>> +++ b/src/gallium/drivers/trace/tr_context.c
>>> @@ -119,7 +119,20 @@ trace_context_draw_vbo(struct pipe_context *_pipe,
>>>
>>>      trace_dump_trace_flush();
>>>
>>> -   pipe->draw_vbo(pipe, info);
>>> +   if (info->indirect) {
>>> +      struct pipe_draw_info *_info = NULL;
>>> +
>>> +      _info = MALLOC(sizeof(*_info));
>>
>>
>> Why malloc?
>
>
> Yeah, this malloc can be removed. There are other few places in this file
> where we malloc things before calling trace_resource_unwrap(), that's why I
> used it. Would you want me to make a patch which removes this malloc and
> maybe some other ones?

It would be nice not to add any new unnecessary mallocs. If you want
clean up the other functions, that's up to you.

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

Reply via email to