[Mesa-dev] [PATCH] vbo: optimize vertex copying when 'wrapping'

Matt Turner mattst88 at gmail.com
Wed Oct 21 16:10:51 PDT 2015


On Wed, Oct 21, 2015 at 3:41 PM, Brian Paul <brianp at vmware.com> wrote:
> Instead of calling memcpy() 'n' times, we can do it all at once since
> the source and dest regions are all contiguous.
> ---
>  src/mesa/vbo/vbo_exec_api.c | 16 +++++++---------
>  src/mesa/vbo/vbo_save_api.c | 15 +++++++--------
>  2 files changed, 14 insertions(+), 17 deletions(-)
>
> diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
> index a23d5aa..d70fc3b 100644
> --- a/src/mesa/vbo/vbo_exec_api.c
> +++ b/src/mesa/vbo/vbo_exec_api.c
> @@ -132,8 +132,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
>  static void
>  vbo_exec_vtx_wrap(struct vbo_exec_context *exec)
>  {
> -   fi_type *data = exec->vtx.copied.buffer;
> -   GLuint i;
> +   GLuint numComponents;

You might use unsigned here (and below).

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list