[Mesa-dev] [PATCH] mesa: Drop the "target" parameter from NewBufferObject().

Ian Romanick idr at freedesktop.org
Wed Oct 15 18:53:41 PDT 2014


On 10/15/2014 01:15 PM, Brian Paul wrote:
> On 10/15/2014 03:06 PM, Kenneth Graunke wrote:
>> NewBufferObject took a "target" parameter, which it blindly passed to
>> _mesa_initialize_buffer_object(), which ignored it.
>>
>> Not much point in passing it around.
>>
>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>> ---
>>   src/mesa/drivers/dri/i915/intel_buffer_objects.c    |  4 ++--
>>   src/mesa/drivers/dri/i965/intel_buffer_objects.c    |  4 ++--
>>   src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c    |  4 ++--
>>   src/mesa/drivers/dri/radeon/radeon_buffer_objects.c |  5 ++---
>>   src/mesa/main/bufferobj.c                           | 14 ++++++--------
>>   src/mesa/main/bufferobj.h                           |  2 +-
>>   src/mesa/main/dd.h                                  |  2 +-
>>   src/mesa/main/shared.c                              |  2 +-
>>   src/mesa/state_tracker/st_cb_bufferobjects.c        |  4 ++--
>>   src/mesa/vbo/vbo_exec_api.c                         |  2 +-
>>   src/mesa/vbo/vbo_save_api.c                         |  4 +---
>>   11 files changed, 21 insertions(+), 26 deletions(-)
>>
> 
> IIRC, the original intention was the target could be used as a hint to
> help with memory allocation/type, but as you see, it was never used.

Right... I could have sworn that i915 used this to determine whether to
malloc memory (VBOs) or get GPU memory (PBOs).  I guess it must do that
some other way... that must be at glBufferData time.

Also

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> Reviewed-by: Brian Paul <brianp at vmware.com>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list