[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Git][xorg-team/lib/mesa][debian-unstable] rules: Disable vulkan swrast, it's getting used instead of the native driver.



True, that a lot of applications don't properly inspect physical devices list.
(I do have some patches to various tools and examples to fix it,
they are already in review by respective projects).
And it is also correct, that the order might be somehow random,
i.e. depended on file system readdir entries order.

However, Mesa's device_selection layer (enabled implicitly and automatically),
will preferentially re-order devices, and that makes all apps
by default that are not smart about it, use non-CPU devices.
Lavapipe will always be considered last.

The displayed warning was just in the wrong place, it is displayed
even if lavapipe is not used, merely instantiated for device enumeration,
which is wrong. Patch to fix this is trivial, and already in review upstream:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8377


Thanks Timo and Michel, for chiming in.

On Thu, 7 Jan 2021 at 16:34, Michel Dänzer <michel@daenzer.net> wrote:
>
> On 2021-01-07 3:54 p.m., Witold Baryluk wrote:
> > That is weird. I have no issues at all. radv is loaded for me by
> > default in essentially all apps.
>
> The fundamental issue is that the Vulkan loader doesn't define any
> particular order in which it enumerates Vulkan devices; it currently at
> least partially depends on the order in which the filesystem enumerates
> the *_icd.<arch>.json files. This means that lavapipe may end up being
> enumerated before or after HW accelerated devices depending on the
> current state of the filesystem, which may change with modifications to
> the directory containing those files.
>
> Applications generally just use the first enumerated device by default,
> without checking if it's HW accelerated or not.
>
>
> > On Thu, 7 Jan 2021 at 14:23, Timo Aaltonen <tjaalton@debian.org> wrote:
> >>
> >> On 7.1.2021 13.22, Witold Baryluk wrote:
> >>> Hi Timo.
> >>>
> >>> Do you know what apps is this happening with that causes problems?
> >>> lavapipe does expose itself as DEVICE_TYPE_CPU, but it is likely
> >>> some apps don't inspect the type properly. Would be interesting
> >>> know which these are to investigate it properly.
> >>>
> >>> Of course, it can be solve with the VK_LAYER_MESA_device_select
> >>> but also obviously we can't make every user need to use it.
> >>>
> >>> Maybe a better option is to package swrast into a own package?
> >>>
> >>> mesa-vulkan-swrast-driver?
> >>>
> >>> Thanks.
> >>
> >> Hi, according to irc everything (starting from vkinfo, vkcube), so we
> >> can't ship it. And doing a separate package doesn't sound like a good
> >> idea, loader/mesa just need to be fixed.
> >>
> >>
> >> --
> >> t
> >
>
>
> --
> Earthling Michel Dänzer               |               https://redhat.com
> Libre software enthusiast             |             Mesa and X developer


Reply to: