<div dir="ltr"><div>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. <br></div><div><br></div><div>-Brian<br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Jan 30, 2025 at 6:57 AM Jose Fonseca <<a href="mailto:jose.fonseca@broadcom.com">jose.fonseca@broadcom.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">That's a relatively large geometry count.<div><br></div><div>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.</div><div><br></div><div>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 <a href="https://vtk.org/" target="_blank">https://vtk.org/</a> ), but I can't remember its name or find it.</div><div><br></div><div>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.</div><div><br></div><div>Can you share a screenshot of what's being rendered to get a notion?</div><div><br></div><div>To make the most of llmvpipe ensure that:</div><div>- 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:`)</div><div>- disable things that increase computation for minor visual enhancements, like MSAA or anisotropic filtering</div><div>- make sure texture mag/min mipmap filters are the same</div><div>- avoid transparency</div><div>- privilege 32-bits rendertarget and texture formats like B8G8R8A8 / R8G8B8A8</div><div><br></div><div>Jose</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 30, 2025 at 12:15 PM George Karpathios <<a href="mailto:gkarpa1@gmail.com" target="_blank">gkarpa1@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>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 <a href="https://imgur.com/a/UvqwBzR" target="_blank">https://imgur.com/a/UvqwBzR</a> . Thanks in advance! </div></div>
</blockquote></div><br></blockquote></div></div>