Re: Install a second set of mesa's vulkan drivers in parallel and use them by default using drop-in files only?

2025-02-03 Thread David Airlie
On Mon, Feb 3, 2025 at 11:59 PM Thorsten Leemhuis  wrote:
>
> On 30.01.25 16:05, Jose Exposito Quintana wrote:
> > As Dave mentioned, it looks like an issue with the loader. This logs are
> > not very useful to figure out which device is mapped to which driver:
> > [...]
>
> Yeah, the debug output is somewhat confusing when different builds of
> the same driver are installed in parallel. :-D
>
> > But it looks like the device associated with "/usr/lib64/
> > libvulkan_radeon.so" is being set as the first one.
>
> Yup.
>
> > I'm not familiar with vulkan-loader's code, but I think that the sorting
> > happens here (compare_devices() function):
> > [...]
> > I'd try to report the bug there, maybe they can clarify if ICD is taken
> > into account in this case.
>
> David, Jose, many thx to both of you for your help. Filed a bug here,
> lets see what happens:
> https://github.com/KhronosGroup/Vulkan-Loader/issues/1647

It might be an idea to change the string in your rebuild just for
debugging purposes initially

Dave.
>
> Ciao Thorsten
>
> > On Thu, Jan 30, 2025 at 7:55 AM Thorsten Leemhuis  > > wrote:
> >
> > On 28.01.25 21:37, David Airlie wrote:
> > > On Wed, Jan 29, 2025 at 4:52 AM Thorsten Leemhuis
> > mailto:fed...@leemhuis.info>> wrote:
> > >>
> > >> Lo! Is it possible to install mesa's vulkan drivers in parallel
> > to the
> > >> ones from the Linux distro and make all apps used them by default
> > using
> > >> drop-in files only?
> > >>
> > >> I'm asking, as I want to provide a RPM package with in a 3rd
> > party repo
> > >> which provides mesa's vulkan drivers that have features compiled
> > in the
> > >> distro in question (Fedora) is unwilling to enable in their
> > regular mesa
> > >> builds.
> > > [...]
> > > Uggh, sounds like a bug in the loader or in device select reordering,
> > >
> > > At a guess device select picks things on the first probe trip, but
> > > maybe either uses the first or last one that matches the underlying
> > > hw,
> > >
> > > it might be that it could be patched to reorder things so it works,
> > > but it could also be the loader ordering things, I'd probably try and
> > > debug device select layers default pick and see if it gets called a
> > > few times when you have multiple installed.
> >
> > David, many thx for your reply. I or besser82 (now CCed) will try to
> > look into this, maybe with your advice we'll be able to fix this.
> >
> > But FWIW and TWIMC, these are the messages I get when trying to use a
> > vulkan app while VK_LOADER_DEBUG=all is set and both drivers are
> > installed:
> >
> > INFO:  No valid vk_loader_settings.json file found, no
> > loader settings will be active
> > LAYER: Searching for implicit layer manifest files
> > LAYER:In following locations:
> > LAYER:   /home/thl/.config/vulkan/implicit_layer.d
> > LAYER:   /etc/xdg/vulkan/implicit_layer.d
> > LAYER:   /etc/vulkan/implicit_layer.d
> > LAYER:   /home/thl/.local/share/vulkan/implicit_layer.d
> > LAYER:   /home/thl/.local/share/flatpak/exports/
> > share/vulkan/implicit_layer.d
> > LAYER:   /var/lib/flatpak/exports/share/vulkan/
> > implicit_layer.d
> > LAYER:   /usr/local/share/vulkan/implicit_layer.d
> > LAYER:   /usr/share/vulkan/implicit_layer.d
> > LAYER:Found the following files:
> > LAYER:   /usr/share/vulkan/implicit_layer.d/
> > VkLayer_MESA_device_select.json
> > INFO:  Found manifest file /usr/share/vulkan/
> > implicit_layer.d/VkLayer_MESA_device_select.json (file version 1.0.0)
> > LAYER: Searching for implicit layer manifest files
> > LAYER:In following locations:
> > LAYER:   /home/thl/.config/vulkan/implicit_layer.d
> > LAYER:   /etc/xdg/vulkan/implicit_layer.d
> > LAYER:   /etc/vulkan/implicit_layer.d
> > LAYER:   /home/thl/.local/share/vulkan/implicit_layer.d
> > LAYER:   /home/thl/.local/share/flatpak/exports/
> > share/vulkan/implicit_layer.d
> > LAYER:   /var/lib/flatpak/exports/share/vulkan/
> > implicit_layer.d
> > LAYER:   /usr/local/share/vulkan/implicit_layer.d
> > LAYER:   /usr/share/vulkan/implicit_layer.d
> > LAYER:Found the following files:
> > LAYER:   /usr/share/vulkan/implicit_layer.d/
> > VkLayer_MESA_device_select.json
> > INFO:  Found manifest file /usr/share/vulkan/
> > implicit_layer.d/VkLayer_MESA_device_select.json (file version 1.0.0)
> > LAYER:

Re: Install a second set of mesa's vulkan drivers in parallel and use them by default using drop-in files only?

2025-02-03 Thread Thorsten Leemhuis
On 28.01.25 21:37, David Airlie wrote:
> On Wed, Jan 29, 2025 at 4:52 AM Thorsten Leemhuis  
> wrote:
>>
>> Lo! Is it possible to install mesa's vulkan drivers in parallel to the
>> ones from the Linux distro and make all apps used them by default using
>> drop-in files only?
>>
>> I'm asking, as I want to provide a RPM package with in a 3rd party repo
>> which provides mesa's vulkan drivers that have features compiled in the
>> distro in question (Fedora) is unwilling to enable in their regular mesa
>> builds.
> [...]
> Uggh, sounds like a bug in the loader or in device select reordering,
> 
> At a guess device select picks things on the first probe trip, but
> maybe either uses the first or last one that matches the underlying
> hw,
> 
> it might be that it could be patched to reorder things so it works,
> but it could also be the loader ordering things, I'd probably try and
> debug device select layers default pick and see if it gets called a
> few times when you have multiple installed.

David, many thx for your reply. I or besser82 (now CCed) will try to
look into this, maybe with your advice we'll be able to fix this.

But FWIW and TWIMC, these are the messages I get when trying to use a
vulkan app while VK_LOADER_DEBUG=all is set and both drivers are
installed:

INFO:  No valid vk_loader_settings.json file found, no loader 
settings will be active
LAYER: Searching for implicit layer manifest files
LAYER:In following locations:
LAYER:   /home/thl/.config/vulkan/implicit_layer.d
LAYER:   /etc/xdg/vulkan/implicit_layer.d
LAYER:   /etc/vulkan/implicit_layer.d
LAYER:   /home/thl/.local/share/vulkan/implicit_layer.d
LAYER:   
/home/thl/.local/share/flatpak/exports/share/vulkan/implicit_layer.d
LAYER:   /var/lib/flatpak/exports/share/vulkan/implicit_layer.d
LAYER:   /usr/local/share/vulkan/implicit_layer.d
LAYER:   /usr/share/vulkan/implicit_layer.d
LAYER:Found the following files:
LAYER:   
/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
INFO:  Found manifest file 
/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json (file 
version 1.0.0)
LAYER: Searching for implicit layer manifest files
LAYER:In following locations:
LAYER:   /home/thl/.config/vulkan/implicit_layer.d
LAYER:   /etc/xdg/vulkan/implicit_layer.d
LAYER:   /etc/vulkan/implicit_layer.d
LAYER:   /home/thl/.local/share/vulkan/implicit_layer.d
LAYER:   
/home/thl/.local/share/flatpak/exports/share/vulkan/implicit_layer.d
LAYER:   /var/lib/flatpak/exports/share/vulkan/implicit_layer.d
LAYER:   /usr/local/share/vulkan/implicit_layer.d
LAYER:   /usr/share/vulkan/implicit_layer.d
LAYER:Found the following files:
LAYER:   
/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
INFO:  Found manifest file 
/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json (file 
version 1.0.0)
LAYER: Searching for explicit layer manifest files
LAYER:In following locations:
LAYER:   /home/thl/.config/vulkan/explicit_layer.d
LAYER:   /etc/xdg/vulkan/explicit_layer.d
LAYER:   /etc/vulkan/explicit_layer.d
LAYER:   /home/thl/.local/share/vulkan/explicit_layer.d
LAYER:   
/home/thl/.local/share/flatpak/exports/share/vulkan/explicit_layer.d
LAYER:   /var/lib/flatpak/exports/share/vulkan/explicit_layer.d
LAYER:   /usr/local/share/vulkan/explicit_layer.d
LAYER:   /usr/share/vulkan/explicit_layer.d
LAYER:Found no files
INFO:  No valid vk_loader_settings.json file found, no loader 
settings will be active
LAYER: Searching for implicit layer manifest files
LAYER:In following locations:
LAYER:   /home/thl/.config/vulkan/implicit_layer.d
LAYER:   /etc/xdg/vulkan/implicit_layer.d
LAYER:   /etc/vulkan/implicit_layer.d
LAYER:   /home/thl/.local/share/vulkan/implicit_layer.d
LAYER:   
/home/thl/.local/share/flatpak/exports/share/vulkan/implicit_layer.d
LAYER:   /var/lib/flatpak/exports/share/vulkan/implicit_layer.d
LAYER:   /usr/local/share/vulkan/implicit_layer.d
LAYER:   /usr/share/vulkan/implicit_layer.d
LAYER:Found the following files:
LAYER:   
/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
INFO:  Found manifest file 
/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json (file 
version 1.0.0)
LAYER: