diff mbox series

[2/2] default-providers: use Mesa a a default provider for OpenCL and Vulkan

Message ID 20260324084454.2971108-2-dmitry.baryshkov@oss.qualcomm.com
State Changes Requested
Headers show
Series [1/2] default-providers: fix GLX / EGL providers | expand

Commit Message

Dmitry Baryshkov March 24, 2026, 8:44 a.m. UTC
Without DEFAULT_RPROVIDERs for the virtual packages OE behaviour is not
deterministic, it's not always obvious, which package will be selected
to fulfill the dependency.

Add DEFAULT_RPROVIDERs for OpenCL and Vulkan ICDs (installable client
drivers) and specify Mesa packages by default. It is a weak assignment,
so the distributions can override those settings.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 meta/conf/distro/include/default-providers.inc | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Purdie March 24, 2026, 11:46 a.m. UTC | #1
On Tue, 2026-03-24 at 10:44 +0200, Dmitry Baryshkov via lists.openembedded.org wrote:
> Without DEFAULT_RPROVIDERs for the virtual packages OE behaviour is
> not deterministic, it's not always obvious, which package will be
> selected to fulfill the dependency.

Can you be more specific about how it isn't deterministic? We should
fix that.

Ideally we shouldn't need to set RPROVIDERS, they're a source of issues
and I'd prefer not to have them at all...

Cheers,

Richard
Dmitry Baryshkov March 24, 2026, 6:22 p.m. UTC | #2
On Tue, Mar 24, 2026 at 11:46:34AM +0000, Richard Purdie wrote:
> On Tue, 2026-03-24 at 10:44 +0200, Dmitry Baryshkov via lists.openembedded.org wrote:
> > Without DEFAULT_RPROVIDERs for the virtual packages OE behaviour is
> > not deterministic, it's not always obvious, which package will be
> > selected to fulfill the dependency.
> 
> Can you be more specific about how it isn't deterministic? We should
> fix that.

I'm sorry for being not explicit. It is not deterministic if the layer
includes other ICD implementations (meta-qcom, meta-freescale, etc.)
You can point out that it's the layer's reposnsibility to handle
providers in this case. However I think that having a predefined default
would be benefitable (and at least would force those layers to override
those providers instead of depending on the undefined behaviour).

In particular, I stumbled upon this in meta-qcom when the package
manager (rpm) was happily selecting the Adreno Vulkan ICD just because
it ended up being the first one.

> Ideally we shouldn't need to set RPROVIDERS, they're a source of issues
> and I'd prefer not to have them at all...
Dmitry Baryshkov March 24, 2026, 8:40 p.m. UTC | #3
On Tue, Mar 24, 2026 at 08:22:40PM +0200, Dmitry Baryshkov wrote:
> On Tue, Mar 24, 2026 at 11:46:34AM +0000, Richard Purdie wrote:
> > On Tue, 2026-03-24 at 10:44 +0200, Dmitry Baryshkov via lists.openembedded.org wrote:
> > > Without DEFAULT_RPROVIDERs for the virtual packages OE behaviour is
> > > not deterministic, it's not always obvious, which package will be
> > > selected to fulfill the dependency.
> > 
> > Can you be more specific about how it isn't deterministic? We should
> > fix that.
> 
> I'm sorry for being not explicit. It is not deterministic if the layer
> includes other ICD implementations (meta-qcom, meta-freescale, etc.)
> You can point out that it's the layer's reposnsibility to handle
> providers in this case. However I think that having a predefined default
> would be benefitable (and at least would force those layers to override
> those providers instead of depending on the undefined behaviour).
> 
> In particular, I stumbled upon this in meta-qcom when the package
> manager (rpm) was happily selecting the Adreno Vulkan ICD just because
> it ended up being the first one.

And I was misunderstanding the DEFAULT_RPROVIDERs story. Please ignore
this.
diff mbox series

Patch

diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 883ea2f8af8c..aeff8afe0119 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -66,4 +66,6 @@  PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 ?= "nativesdk-libsdl2"
 
 PREFERRED_RPROVIDER_virtual-libegl-icd ?= "libegl-mesa"
 PREFERRED_RPROVIDER_virtual-libglx-icd ?= "libglx-mesa"
+PREFERRED_RPROVIDER_virtual-opencl-icd ?= "libopencl-mesa"
+PREFERRED_RPROVIDER_virtual-vulkan-icd ?= "mesa-vulkan-drivers"
 PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"