Mesa includes a software rasterizer for vulkan ("lavapipe"). Very similar to how llvmpipe works. But the ebuild currently ignore it. (thx BtbN @ irc for the following information): It's probably just a matter of adding a line "vulkan_enable -- swrast" inside the "if use vulkan; then" block. Or whichever way you experts might think of. Reproducible: Always
I did exactly that in my local overlay. You still get the message * Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d But at the end, you do have vulkan files installed: --- files.mesa.before 2021-10-14 00:06:37.990659234 +0200 +++ files.mesa.after 2021-10-14 00:10:00.471939276 +0200 @@ -26,6 +26,7 @@ /usr/lib/libglapi.so /usr/lib/libglapi.so.0 /usr/lib/libglapi.so.0.0.0 +/usr/lib/libvulkan_lvp.so /usr/lib/pkgconfig /usr/lib/pkgconfig/dri.pc /usr/lib/pkgconfig/gbm.pc @@ -53,6 +54,7 @@ /usr/lib64/libglapi.so /usr/lib64/libglapi.so.0 /usr/lib64/libglapi.so.0.0.0 +/usr/lib64/libvulkan_lvp.so /usr/lib64/pkgconfig /usr/lib64/pkgconfig/dri.pc /usr/lib64/pkgconfig/gbm.pc @@ -63,13 +65,16 @@ /usr/share/glvnd/egl_vendor.d/50_mesa.json /usr/share/vulkan +/usr/share/vulkan/icd.d +/usr/share/vulkan/icd.d/lvp_icd.i686.json +/usr/share/vulkan/icd.d/lvp_icd.x86_64.json /usr/share/vulkan/implicit_layer.d /usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json And more importantly, vulkan-info now reports something: orzel@berlioz /var/tmp% vulkaninfo WARNING: lavapipe is not a conformant vulkan implementation, testing use only. ========== VULKANINFO ========== Vulkan Instance Version: 1.2.182 ...
I tried some vulkan exmples found on the web, and most of them work. Those that don't require some extension not implemented (yet?) by lavapipe.
I concur! I can't even run sway on this crappy ast graphics without a vulkan software renderer. What can we do to get these changes in the main tree?
It's really not much to change in the ebuild ...
(In reply to Thomas Capricelli from comment #4) > It's really not much to change in the ebuild ... Can you attach a git am-able patch to the ebuild using git format-patch then? Thanks.
i dont know about "git am-able patch", but this is really as said : just add this one liner: --- /usr/portage/media-libs/mesa/mesa-22.2.3.ebuild 2022-11-14 23:24:19.873280859 +0100 +++ mesa-22.2.3-r1.ebuild 2022-11-17 18:19:57.361835712 +0100 @@ -416,6 +416,7 @@ vulkan_enable video_cards_d3d12 microsoft-experimental vulkan_enable video_cards_radeonsi amd vulkan_enable video_cards_v3d broadcom + vulkan_enable -- swrast fi driver_list() {
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c628930a95b68330942158cd315ff66f286cb23 commit 0c628930a95b68330942158cd315ff66f286cb23 Author: Paul Zander <negril.nx+gentoo@gmail.com> AuthorDate: 2023-06-15 13:40:54 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2023-06-16 20:24:22 +0000 media-libs/mesa: add Vulkan software rasterizer as VIDEO_CARDS=lavapipe Mesa includes a software rasterizer for vulkan ("lavapipe") based on llvmpipe. Add lavapipe to VIDEO_CARDS to enable it. Bug: https://bugs.gentoo.org/818019 Closes: https://github.com/gentoo/gentoo/pull/31455 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org> media-libs/mesa/mesa-23.1.2-r1.ebuild | 449 ++++++++++++++++++++++++++++++++++ media-libs/mesa/mesa-9999.ebuild | 4 +- profiles/desc/video_cards.desc | 1 + 3 files changed, 453 insertions(+), 1 deletion(-)
I'm not sure. With current ebuild installed (media-libs/mesa-23.1.1) i got: % equery files mesa |grep lvp # nothing % vulkaninfo ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers! Cannot create Vulkan instance. While with the software rasterizer, i had an output for both commands. Mesa is installed with +wayland +vulkan as confirmed by "equery uses mesa"
I mean, i do see the line "gallium_enable -- swrast" in the ebuild, but i'm not sure what gallium_enable does.
Did you enable VIDEO_CARDS=lavapipe ...? I see /usr/lib64/libvulkan_lvp.so on my system.
Yes, in particular, note that what was committed was *not* the original patch posted in this bug. You can see it at https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c628930a95b68330942158cd315ff66f286cb23 which clearly has lavapipe.
Yeps, portage update + VIDEO_CARDS=lavapipe solved this. Thanks for bringing lavapipe to gentoo !