[Mesa-dev] [PATCH 11/17] Modified _mesa_buffer_data to use _mesa_align_malloc.
brian.e.paul at gmail.com
Wed Nov 27 06:03:53 PST 2013
On Tue, Nov 26, 2013 at 11:34 AM, Siavash Eliasi <siavashserver at gmail.com>wrote:
> Now I understand why _mesa_realloc is not appropriate to use here. From
> glBufferData creates a new data store for the buffer object currently
>> bound to target. Any pre-existing data store is deleted. The new data store
>> is created with the specified size in bytes and usage.
>> If data is NULL, a data store of the specified size is still created, but
>> its contents remain uninitialized and thus undefined.
> Best regards,
> Siavash Eliasi.
> On 11/26/2013 09:34 AM, Siavash Eliasi wrote:
>> Yes I think you are right, I guess *_mesa_align_realloc* is the correct
>> function which should be used here.
>> What do you think Ian?
>> Best regards,
>> Siavash Eliasi.
Realloc was a poor choice in the first place. It would needlessly copy
data from the old buffer to the new one.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev