Lavapipe performance
Brian Paul
brian.e.paul at gmail.com
Thu Jan 30 14:33:10 UTC 2025
In addition to what Jose listed, one simple experiment is to try rendering
to a smaller window. How does the frame rate change? If it's basically
inversely proportional to the window size, that tells us that the rendering
is limited by fragment generation/processing. Otherwise, perhaps you're
geometry (vertex) limited. It's also hard to say without knowing what your
shaders are doing or what fixed function features you might be using.
-Brian
On Thu, Jan 30, 2025 at 6:57 AM Jose Fonseca <jose.fonseca at broadcom.com>
wrote:
> That's a relatively large geometry count.
>
> llvmpipe (and consequently lavapipe) was optimized for desktop compositors
> and UIs: large textured quads with blending, where most of the time is
> spent in the fragment shader, particular texture sampling.
>
> Not much effort went into optimizing llvmpipe for high geometry count --
> for example, VS is not overlapped with FS. At one point there was another
> SW renderer gallium driver by a team at Intel that was specifically
> optimized for huge number of primitives with no texturing (like the sort
> used by https://vtk.org/ ), but I can't remember its name or find it.
>
> Tiny triangles are also inefficient, because llvmpipe always runs 2x2
> pixel stamps, no matter if the triangle only covers a single pixel, plus
> blending is always done in 4x4 pixels stamps.
>
> Can you share a screenshot of what's being rendered to get a notion?
>
> To make the most of llmvpipe ensure that:
> - llvmpipe is using 8 (or 16?) threads (I believe using the number of
> cores is the default, you can control this via `LP_NUM_THREADS:`)
> - disable things that increase computation for minor visual enhancements,
> like MSAA or anisotropic filtering
> - make sure texture mag/min mipmap filters are the same
> - avoid transparency
> - privilege 32-bits rendertarget and texture formats like B8G8R8A8 /
> R8G8B8A8
>
> Jose
>
>
> On Thu, Jan 30, 2025 at 12:15 PM George Karpathios <gkarpa1 at gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm using Lavapipe (24.2.2, Windows 10) and trying to evaluate its
>> performance, but I don't know if I can get more performance out of it or if
>> I'm hitting its expected limits.
>>
>> For example, rendering a scene with ~300k triangles and ~150k lines, I
>> get 5 fps on an i7 11800H (8 cores). Of course I'm not expecting miracles
>> but I was wondering if this is an expected performance range or if it
>> should perform better.
>>
>> I have profiled it using VS's builtin tools, I'm getting some hotspots
>> inside Lavapipe's dll, but I can't make any meaningful results by myself,
>> or associate them with our code, in case we're doing something wrong that
>> hurts the performance. I can't figure out what's normal and what's not, so
>> if anyone would be willing to take a look at those, maybe someone can spot
>> something out of the ordinary or provide some hints for me to understand it
>> better and be able to continue, I would be grateful. I have uploaded a few
>> screenshots at https://imgur.com/a/UvqwBzR . Thanks in advance!
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20250130/c1d1f125/attachment.htm>
More information about the mesa-dev
mailing list