[Mesa-dev] [PATCH] vbo: Avoid unnecessary copy to/from current in vertex format upgrade.

Brian Paul brianp at vmware.com
Mon Nov 1 14:59:37 PDT 2010


On 11/01/2010 02:06 PM, Francisco Jerez wrote:
> Rebuilding the vertex format from scratch every time we see a new
> vertex attribute is rather costly, new attributes can be appended at
> the end avoiding a copy to current and then back again, and the full
> attr pointer recalculation.
>
> In the not so likely case of an already existing attribute having its
> size increased the old behavior is preserved, this could be optimized
> more, not sure if it's worth it.
>
> It's a modest improvement in FlightGear (that game punishes the VBO
> module pretty hard in general, framerate goes from some 46 FPS to 50
> FPS with the nouveau classic driver).
> ---
> I've run piglit before and after and apparently there are no
> regressions, Tested-by's on different hardware would be appreciated
> though.

I tested the patch here with a few things and it seems good.

Signed-off-by: Brian Paul <brianp at vmware.com>




More information about the mesa-dev mailing list