Performance issues with Lavapipe in Windows (?)

George Karpathios gkarpa1 at gmail.com
Fri Apr 7 15:07:11 UTC 2023


Ok, with the workaround I can see the scene and the frame times are
absolutely fantastic. Thank you so much once again for this find! Now I can
close all 110 of my Chrome tabs :)

Best regards,
George

On Fri, Apr 7, 2023 at 5:34 PM Mike Blumenkrantz <
michael.blumenkrantz at gmail.com> wrote:

> You can try deleting the lvp_find_inlinable_uniforms() call from
> lvp_pipeline.c as a temporary workaround. I'll try something on my end to
> make this less stupid.
>
> On Fri, Apr 7, 2023 at 10:22 AM George Karpathios <gkarpa1 at gmail.com>
> wrote:
>
>> Awesome, thanks for the tip!
>>
>> Well now I indeed get *very* nice frame times. Great catch, thank you!
>> But I don't see anything on the viewport, I guess due to the early return.
>> How should I proceed?
>>
>> Best regards,
>> George
>>
>>
>> On Fri, Apr 7, 2023 at 4:56 PM Mike Blumenkrantz <
>> michael.blumenkrantz at gmail.com> wrote:
>>
>>> Looks like it's compiling a lot of shader variants.
>>>
>>> You could try adding a return at the top of update_inline_shader_state()
>>> to see if it's trying too hard to inline.
>>>
>>> On Fri, Apr 7, 2023 at 9:53 AM George Karpathios <gkarpa1 at gmail.com>
>>> wrote:
>>>
>>>> Hi again, thank you Adam & Marek for your feedback! I appreciate it.
>>>>
>>>> Unfortunately It's the same amount of time even if I skip the
>>>> swapchain. I have profiled some seconds of the execution using Visual
>>>> Studio's profiler (with the swapchain, normally) while panning an almost
>>>> empty scene, and it's identifying a hotpath. I have uploaded 2 screenshots
>>>> of the call tree at  https://imgur.com/a/cxtXdOz  if you'd like to
>>>> check it out.
>>>>
>>>> Another thing I'd like to note is that by using Mesa 23.1-dev (instead
>>>> of 23.0.1) I got a nice performance boost of ~2-3x. However it's still
>>>> performing slower than what I'd expect on this system (right now it takes
>>>> 60ms for 10 lines so I feel that something weird is still going on). Big
>>>> congratulations on your tremendous work anyway.
>>>>
>>>> Best regards,
>>>> George
>>>>
>>>>
>>>> On Tue, Apr 4, 2023 at 9:24 PM Adam Jackson <ajax at redhat.com> wrote:
>>>>
>>>>> My first suspicion would be to rule out window system interaction. If
>>>>> you render to your own VkImage instead of to a swapchain, how fast can you
>>>>> go?
>>>>>
>>>>> - ajax
>>>>>
>>>>>
>>>>> On Tue, Apr 4, 2023 at 12:56 PM George Karpathios <gkarpa1 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi list, I hope all is well.
>>>>>>
>>>>>> I would like to ask if there are any known issues regarding the
>>>>>> performance of Lavapipe in Windows 10.
>>>>>>
>>>>>> I'm trying to add support for Vulkan software rendering into a
>>>>>> relatively large 3d modeling/rendering application, so I opted to try Mesa
>>>>>> and Lavapipe. I built LLVM 16.0.0 and Mesa 23.0.1 using the documentation
>>>>>> (thanks for that!). My environment is an 8-core Intel i7 (with an
>>>>>> integrated iGPU) with 32GiB RAM, an nVidia RTX 3070 and Visual Studio
>>>>>> 2019/MSVC.
>>>>>>
>>>>>> The build procedure seems to be ok (Release builds, proper linking
>>>>>> with either MT or MD runtime libraries, proper DLL loading via
>>>>>> VK_ICD_FILENAMES) but the performance I'm getting during runtime is very
>>>>>> slow. It looks like it needs 1-1.5 seconds to render a virtually empty
>>>>>> scene (think just a floor grid of lines)  and over 15-20 seconds for a
>>>>>> frame of a few thousand vertices. The CPU utilisation also seems to be low,
>>>>>> under 20-25%.
>>>>>>
>>>>>> I understand that the information I provide is probably vague, but at
>>>>>> this point I just want to rule some probable causes out, like is there any
>>>>>> version of LLVM or Mesa or combination of them that is known to have such
>>>>>> issues? Maybe some build/installation configuration parameter or
>>>>>> environment variable that is important in Windows specifically and I may
>>>>>> have missed (I tried tweaking LP_NUM_THREADS but didn't change anything) ?
>>>>>> Anything that could point me in the right direction is highly valuable &
>>>>>> appreciated.
>>>>>>
>>>>>> Also probably worth noting is the fact that the vkcube(pp) demo from
>>>>>> the Vulkan SDK seems to run ok with Lavapipe, but in this case I also
>>>>>> notice (in task manager) a ~50% utilization of the integrated iGPU (why?).
>>>>>> In the aforementioned larger application I don't notice any usage of the
>>>>>> integrated iGPU.
>>>>>>
>>>>>> Any advice on what I could check/double check is more than welcome.
>>>>>> Thank you in advance for your time.
>>>>>>
>>>>>> Best regards,
>>>>>> George
>>>>>>
>>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20230407/baf2337a/attachment.htm>


More information about the mesa-dev mailing list