Skip to contentSkip to conversation

default-providers: fix GLX / EGL providers

PATCH In review Dmitry Baryshkov 2 participants 5 messages Mar 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 default-providers: fix GLX / EGL providers

DEFAULT_RPROVIDER is expected to list runtime package names rather than recipes. Fix runtime providers for EGL and GLX ICD virtual packages.

Fixes c2b4971e79ec ("default-providers: fix GLVND providers to be selected at runtime")
---
 meta/conf/distro/include/default-providers.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/default-providers.inc +2 -2
index 5101ad78f880..883ea2f8af8c 100644
@@ -64,6 +64,6 @@ PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
 PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
 PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 ?= "nativesdk-libsdl2"
 
-PREFERRED_RPROVIDER_virtual-libegl-icd ?= "mesa"
-PREFERRED_RPROVIDER_virtual-libglx-icd ?= "mesa"
+PREFERRED_RPROVIDER_virtual-libegl-icd ?= "libegl-mesa"
+PREFERRED_RPROVIDER_virtual-libglx-icd ?= "libglx-mesa"
 PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"
Signature · 1 line
2.47.3
#1 lore raw

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

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.

---
 meta/conf/distro/include/default-providers.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/conf/distro/include/default-providers.inc +2 -0
index 883ea2f8af8c..aeff8afe0119 100644
@@ -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"
Signature · 1 line
2.47.3
#2 lore raw

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

Quoted 3 lines · Dmitry Baryshkov via lists.openembedded.org

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

#3 lore raw

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

Quoted 7 lines · Richard Purdie
Quoted 3 lines · Dmitry Baryshkov via lists.openembedded.org

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.

Quoted 2 lines

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

Signature · 2 lines
With best wishes
Dmitry
#4 lore raw

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

Quoted 16 lines · Dmitry Baryshkov
Quoted 7 lines · Richard Purdie
Quoted 3 lines · Dmitry Baryshkov via lists.openembedded.org

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).

Quoted 3 lines

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.

Signature · 2 lines
With best wishes
Dmitry