[Mesa-users] Offline compilation of Vulkan compute shaders

Elias Naur mail at eliasnaur.com
Fri Mar 26 13:16:47 UTC 2021


Hi,

I maintain the Gio[0] immediate mode GUI library, which is in progress
of switching to a compute shader pipeline, piet-gpu[1] for rendering
vector graphics.

To provide a fallback for devices with older, buggy, missing GPUs I'd
like to compile the shaders for each CPU architecture we support
(x86_64, 32 and 64 bit arm) and link them into Gio programs. By doing
so, I avoid runtime shader compilation and having to include something
like SwiftShader just for compiling and running a static set of shaders.

Is offline compilation possible with, say, lavapipe or something else in
Mesa? I managed to hack[2] SwiftShader to do it, but I'd love to avoid
the hacks, and Dave's recent performance comparison[3] looks promising.

If it is not supported today, would you be interested in me adding
support, and if so, a few pointers to get started would be much
appreciated.

Thanks,
Elias

[0] https://gioui.org
[1] https://github.com/linebender/piet-gpu
[2] https://github.com/eliasnaur/swiftshader
[3] https://airlied.blogspot.com/2021/03/sketchy-vulkan-benchmarks-lavapipe-vs.html?m=1


More information about the mesa-users mailing list