[Mesa-dev] [PATCH] i965: Ask the VBO module to actually use VBOs.
Eric Anholt
eric at anholt.net
Wed May 21 11:23:49 PDT 2014
Matt Turner <mattst88 at gmail.com> writes:
> On Tue, May 20, 2014 at 11:00 AM, Eric Anholt <eric at anholt.net> wrote:
>> Note that this covers the Begin/End rendering path, but not user vertex
>> arrays (so we can't drop copy_array_to_vbo_array() code). Improves
>> performance of isosurf GLVERTEX|TRIANGLES by 16.7506% +/- 4.98934%
>> (n=20). No difference on openarena (n=10), which was why this was reverted
>> back in cbde2765804a4fc62bcf092230a01376aedbf2cd.
>> ---
>> src/mesa/drivers/dri/i965/brw_context.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
>> index 17ae685..39dd582 100644
>> --- a/src/mesa/drivers/dri/i965/brw_context.c
>> +++ b/src/mesa/drivers/dri/i965/brw_context.c
>> @@ -781,6 +781,9 @@ brwCreateContext(gl_api api,
>> brw_init_performance_monitors(brw);
>> }
>>
>> + vbo_use_buffer_objects(ctx);
>> + vbo_always_unmap_buffers(ctx);
>> +
>
> Just for my own understanding:
>
> This is opting-in to using a VBO to back immediate-mode data?
>
> How is immediate-mode data sent to the GPU before this?
>
> In case it's not obvious from the answer to the previous question, why
> is putting the data in a VBO such an improvement?
Before, you'd store it in malloced memory, then
copy_array_to_vbo_array() in brw_draw_upload.c would put it in a VBO
later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140521/b48c2f32/attachment.sig>
More information about the mesa-dev
mailing list