[Mesa-dev] size of LP_MAX_VBUF_SIZE

Roland Scheidegger sroland at vmware.com
Thu Feb 20 17:27:33 UTC 2020


Am 20.02.20 um 02:45 schrieb Dave Airlie:
> Hey,
> 
> Anyone know why LP_MAX_VBUF_SIZE is only 4K?
> 
> Tess submits > 100K verts to the draw pipeline, which start to split
> them, due to the 4K size of the above it splits 50 vertices per vbuf,
> however it then calls draw_reset_vertex_ids which iterates over all
> 100K vertices each time.
> 
> I might try fixing the reset, but I wondered why this was only sending
> 50 vertices at a time to the rasterizer.
> 
> Dave.
> 

Dave,

I don't recall, I think this even predates me working on llvmpipe...
That said, I think in general splitting into smaller chunks is done so
things are more cache friendly (though the limit is so low it would fit
into l1 cache even back then...). And probably the overhead of invoking
things multiple times just wasn't all that large compared to the
execution time of the vs (and the setup code in llvmpipe).
I don't know if that was actually measured though at some point, and it
is quite possible the average vertex size got quite a bit larger since
then (hence max vertices per split lower), as everything was geared
towards quite simple apps back then.

So I think increasing the limit is probably quite fine, but splitting
still needs to work correctly.

Roland


More information about the mesa-dev mailing list