* [PATCH v5 0/3] mesa: RustiCL support
@ 2023-12-30 19:14 Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 1/3] mesa: drop -Dopencl-native=true Dmitry Baryshkov
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2023-12-30 19:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zoltán Böszörményi
RustiCL is a new OpenCL implementation developed within the mesa
library. It supports more drivers and more features compared to the
existing Clover implementation. The Clover is supposed to fade away and
to be removed in the foreseeble feature ([1]), thus it doesn't make
sense to add separate clover / rusticl options, they are going to be
removed anyway.
This series is based on previous work by Zoltán ([2]), so it starts its
versions from v4.
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385
[2] https://lore.kernel.org/openembedded-core/20230306091108.3347363-1-zboszor@gmail.com/
Changes since v4:
- Switched to patchset from the merge request rather than using the
interim patch from Karol Herbst.
Changes since v3:
- Dropped clover / rusticl separation in PACKAGECONFIG
- Reworked rust inheritance to allow changing of PACKAGECONFIG from
bbappend files
- Added an upstream fix
- Dropped removed config option
Dmitry Baryshkov (2):
mesa: drop -Dopencl-native=true
mesa: fix building of RustiCL + nouveau
Zoltán Böszörményi (1):
mesa: add support for RustiCL under PACKAGECONFIG "opencl"
meta/recipes-graphics/mesa/files/26680.patch | 236 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 23 +-
2 files changed, 253 insertions(+), 6 deletions(-)
create mode 100644 meta/recipes-graphics/mesa/files/26680.patch
--
2.39.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v5 1/3] mesa: drop -Dopencl-native=true
2023-12-30 19:14 [PATCH v5 0/3] mesa: RustiCL support Dmitry Baryshkov
@ 2023-12-30 19:14 ` Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 3/3] mesa: fix building of RustiCL + nouveau Dmitry Baryshkov
2 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2023-12-30 19:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zoltán Böszörményi
The flag -Dopencl-native=true was dropped in Mesa 22.3, remove it from
mesa.inc.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
meta/recipes-graphics/mesa/mesa.inc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 5f5c8ceb4c84..efbce5caade5 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -140,8 +140,7 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
-OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
+PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true,-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
PACKAGECONFIG[broadcom] = ""
PACKAGECONFIG[etnaviv] = ""
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2023-12-30 19:14 [PATCH v5 0/3] mesa: RustiCL support Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 1/3] mesa: drop -Dopencl-native=true Dmitry Baryshkov
@ 2023-12-30 19:14 ` Dmitry Baryshkov
2023-12-30 21:02 ` [OE-core] " Richard Purdie
2023-12-30 19:14 ` [PATCH v5 3/3] mesa: fix building of RustiCL + nouveau Dmitry Baryshkov
2 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2023-12-30 19:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zoltán Böszörményi
From: Zoltán Böszörményi <zboszor@gmail.com>
Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
(newer one). Extend the "opencl" package config to include both
implementations into the libopencl-mesa (-dev) packages. As the Clover
implementation is in maintenance mode and is expected to be removed at
some point, it doesn't make sense to split the packages or to provide
two config options.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
[DB: reworked rust class inheritance]
[DB: merged "rusticl" and "clover" back to "opencl"]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index efbce5caade5..a192562a7935 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -48,6 +48,12 @@ PROVIDES = " \
inherit meson pkgconfig python3native gettext features_check
+# We can not include rust conditionally, otherwise it can not be overriden by
+# the bbappends. Instead always include it, but remove the dependencies by
+# default.
+inherit rust
+INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
+
BBCLASSEXTEND = "native nativesdk"
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
@@ -139,8 +145,13 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
# "egl" requires "opengl"
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
-# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true,-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
+# "clover" requires libclc from meta-clang and python3-ply-native and spirv-tools from OE-Core
+# "rusticl" requires libclc, spirv-llvm-translator and bindgen-cli-native from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[opencl] = "\
+ -Dgallium-opencl=icd -Dopencl-spirv=true -Dgallium-rusticl=true -Drust_std=2021, \
+ -Dgallium-opencl=disabled -Dopencl-spirv=false -Dgallium-rusticl=false, \
+ libclc spirv-tools bindgen-cli-native python3-ply-native"
+#PACKAGECONFIG[opencl] = ",,spirv-llvm-translator"
PACKAGECONFIG[broadcom] = ""
PACKAGECONFIG[etnaviv] = ""
@@ -221,7 +232,7 @@ DEV_PKG_DEPENDENCY = ""
# development package of libgles3.
RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
-RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libosmesa libosmesa-dev \
@@ -332,7 +343,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
FILES:libgl-mesa = "${libdir}/libGL.so.*"
FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/*.icd"
FILES:libglapi = "${libdir}/libglapi.so.*"
FILES:libosmesa = "${libdir}/libOSMesa.so.*"
FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -346,7 +357,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*"
FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
FILES:libgles3-mesa-dev = "${includedir}/GLES3"
-FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
+FILES:libopencl-mesa-dev = "${libdir}/lib*OpenCL.so"
FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v5 3/3] mesa: fix building of RustiCL + nouveau
2023-12-30 19:14 [PATCH v5 0/3] mesa: RustiCL support Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 1/3] mesa: drop -Dopencl-native=true Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
@ 2023-12-30 19:14 ` Dmitry Baryshkov
2024-01-23 14:34 ` Antoine Coutant
2 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2023-12-30 19:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zoltán Böszörményi
Incorporate a patch by Karol Herbst, fixing nouveau / libgalliumvl
dependency.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
meta/recipes-graphics/mesa/files/26680.patch | 236 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 1 +
2 files changed, 237 insertions(+)
create mode 100644 meta/recipes-graphics/mesa/files/26680.patch
diff --git a/meta/recipes-graphics/mesa/files/26680.patch b/meta/recipes-graphics/mesa/files/26680.patch
new file mode 100644
index 000000000000..a42b7667edee
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/26680.patch
@@ -0,0 +1,236 @@
+From daf4935359cb3c88606536924e346ead5e4b2137 Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Thu, 14 Dec 2023 03:19:34 +0100
+Subject: [PATCH 1/7] gallium/vl: stub vl_video_buffer_create_as_resource
+
+It's used by radeonsi
+
+Signed-off-by: Karol Herbst <kherbst@redhat.com>
+Upstream-Status: Pending [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680]
+---
+ src/gallium/auxiliary/vl/vl_stubs.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c
+index 194e7a8700b6b..89e5f28128909 100644
+--- a/src/gallium/auxiliary/vl/vl_stubs.c
++++ b/src/gallium/auxiliary/vl/vl_stubs.c
+@@ -146,6 +146,16 @@ vl_create_mpeg12_decoder(struct pipe_context *pipe,
+ return NULL;
+ }
+
++struct pipe_video_buffer *
++vl_video_buffer_create_as_resource(struct pipe_context *pipe,
++ const struct pipe_video_buffer *tmpl,
++ const uint64_t *modifiers,
++ int modifiers_count)
++{
++ assert(0);
++ return NULL;
++}
++
+ /*
+ * vl_zscan
+ */
+--
+GitLab
+
+
+From 5dd1598b5ac988d3ef53adc9dcb1f2bc1788513c Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Sat, 30 Dec 2023 20:00:33 +0100
+Subject: [PATCH 2/7] gallium/vl: remove stubs which are already defined in
+ mesa_util
+
+---
+ src/gallium/auxiliary/vl/vl_stubs.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c
+index 89e5f28128909..fcdbd9850428b 100644
+--- a/src/gallium/auxiliary/vl/vl_stubs.c
++++ b/src/gallium/auxiliary/vl/vl_stubs.c
+@@ -155,9 +155,3 @@ vl_video_buffer_create_as_resource(struct pipe_context *pipe,
+ assert(0);
+ return NULL;
+ }
+-
+-/*
+- * vl_zscan
+- */
+-const int vl_zscan_normal[] = {0};
+-const int vl_zscan_alternate[] = {0};
+--
+GitLab
+
+
+From 6df28bce29d34da949f84739f52a5eff7fb01b80 Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Thu, 14 Dec 2023 03:20:08 +0100
+Subject: [PATCH 3/7] rusticl: link against libgalliumvl_stub
+
+---
+ src/gallium/targets/rusticl/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build
+index b2963fe6dfa76..e1acaca7e68e3 100644
+--- a/src/gallium/targets/rusticl/meson.build
++++ b/src/gallium/targets/rusticl/meson.build
+@@ -42,6 +42,7 @@ librusticl = shared_library(
+ ],
+ link_whole : librusticl,
+ link_with : [
++ libgalliumvl_stub,
+ libpipe_loader_static,
+ libswdri,
+ libswkmsdri,
+--
+GitLab
+
+
+From b158c041e2b89c73fd16be945286efa7dcf9b75f Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Thu, 14 Dec 2023 03:28:48 +0100
+Subject: [PATCH 4/7] frontend/nine: link against libgalliumvl_stub
+
+---
+ src/gallium/targets/d3dadapter9/meson.build | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build
+index 282859fd93266..c6f1a0dc2a287 100644
+--- a/src/gallium/targets/d3dadapter9/meson.build
++++ b/src/gallium/targets/d3dadapter9/meson.build
+@@ -27,7 +27,7 @@ gallium_nine_c_args = []
+ gallium_nine_ld_args = []
+ gallium_nine_link_depends = []
+ gallium_nine_link_with = [
+- libgallium, libnine_st,
++ libgallium, libgalliumvl_stub, libnine_st,
+ libpipe_loader_static, libws_null, libwsw, libswdri,
+ libswkmsdri,
+ ]
+@@ -37,13 +37,6 @@ if with_ld_version_script
+ gallium_nine_link_depends += files('d3dadapter9.sym')
+ endif
+
+-if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
+- with_dri)
+- gallium_nine_link_with += libgalliumvl
+-else
+- gallium_nine_link_with += libgalliumvl_stub
+-endif
+-
+ libgallium_nine = shared_library(
+ 'd3dadapter9',
+ files('description.c', 'getproc.c', 'drm.c'),
+--
+GitLab
+
+
+From 9d3192871d5038f73317fd2770118dc0ba08e6d4 Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Thu, 14 Dec 2023 03:29:14 +0100
+Subject: [PATCH 5/7] dri: link against libgalliumvl_stub
+
+---
+ src/gallium/targets/dri/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
+index 83925248b17e6..e50581dc121e6 100644
+--- a/src/gallium/targets/dri/meson.build
++++ b/src/gallium/targets/dri/meson.build
+@@ -50,7 +50,7 @@ libgallium_dri = shared_library(
+ link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args],
+ link_depends : gallium_dri_link_depends,
+ link_with : [
+- libdri, libmesa, libgalliumvl,
++ libdri, libmesa, libgalliumvl_stub,
+ libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
+ libswkmsdri,
+ ],
+--
+GitLab
+
+
+From 2039ab261c5fc7f41139514e969ac83e17731cbf Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Thu, 14 Dec 2023 03:29:20 +0100
+Subject: [PATCH 6/7] wgl: link against libgalliumvl_stub
+
+---
+ src/gallium/targets/wgl/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build
+index eaca0aec86b50..6ec171b741a0d 100644
+--- a/src/gallium/targets/wgl/meson.build
++++ b/src/gallium/targets/wgl/meson.build
+@@ -38,7 +38,7 @@ libgallium_wgl = shared_library(
+ ],
+ link_whole : [libwgl],
+ link_with : [
+- libgallium, libglsl, libmesa, libwsgdi, libglapi_static, libglapi, libgalliumvl
++ libgallium, libglsl, libmesa, libwsgdi, libglapi_static, libglapi, libgalliumvl_stub,
+ ],
+ dependencies : [
+ dep_ws2_32, idep_nir, idep_mesautil, driver_swrast,
+--
+GitLab
+
+
+From dac47334c7ae336854991ffb4f564b007abd8585 Mon Sep 17 00:00:00 2001
+From: Karol Herbst <kherbst@redhat.com>
+Date: Thu, 14 Dec 2023 03:20:25 +0100
+Subject: [PATCH 7/7] gallium/drivers: do not link against libgalliumvl
+ directly
+
+libgalliumvl_stub was added so not all frontends have to link in full
+video accleration support, shaving off around 100kB of binary size.
+---
+ src/gallium/drivers/d3d12/meson.build | 2 +-
+ src/gallium/drivers/r600/meson.build | 1 -
+ src/gallium/drivers/radeonsi/meson.build | 2 +-
+ 3 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/gallium/drivers/d3d12/meson.build b/src/gallium/drivers/d3d12/meson.build
+index aba1f3da056f8..c12e8f35267a1 100644
+--- a/src/gallium/drivers/d3d12/meson.build
++++ b/src/gallium/drivers/d3d12/meson.build
+@@ -133,5 +133,5 @@ libd3d12 = static_library(
+
+ driver_d3d12 = declare_dependency(
+ compile_args : '-DGALLIUM_D3D12',
+- link_with : [libd3d12, libgalliumvl],
++ link_with : [libd3d12],
+ )
+diff --git a/src/gallium/drivers/r600/meson.build b/src/gallium/drivers/r600/meson.build
+index 023719a3a16f2..974b59d4594b9 100644
+--- a/src/gallium/drivers/r600/meson.build
++++ b/src/gallium/drivers/r600/meson.build
+@@ -185,7 +185,6 @@ libr600 = static_library(
+ inc_src, inc_mapi, inc_mesa, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
+ inc_gallium_drivers,
+ ],
+- link_with : [ libgalliumvl ],
+ dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers],
+ )
+
+diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build
+index 29afa87c0b654..c89c417b02c08 100644
+--- a/src/gallium/drivers/radeonsi/meson.build
++++ b/src/gallium/drivers/radeonsi/meson.build
+@@ -168,7 +168,7 @@ libradeonsi = static_library(
+ driver_radeonsi = declare_dependency(
+ compile_args : '-DGALLIUM_RADEONSI',
+ link_with : radeonsi_gfx_libs + [
+- libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libgalliumvl
++ libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm
+ ],
+ dependencies : idep_nir,
+ )
+--
+GitLab
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a192562a7935..7cebe45fa2bc 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -18,6 +18,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-gallium-Fix-build-with-llvm-17.patch \
+ file://26680.patch \
"
SRC_URI[sha256sum] = "6e48126d70fdb3f20ffeb246ca0c2e41ffdc835f0663a03d4526b8bf5db41de6"
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2023-12-30 19:14 ` [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
@ 2023-12-30 21:02 ` Richard Purdie
2024-01-02 10:32 ` Dmitry Baryshkov
2024-01-23 14:34 ` Antoine Coutant
0 siblings, 2 replies; 15+ messages in thread
From: Richard Purdie @ 2023-12-30 21:02 UTC (permalink / raw)
To: Dmitry Baryshkov, openembedded-core
Cc: Zoltán Böszörményi
On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> From: Zoltán Böszörményi <zboszor@gmail.com>
>
> Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> (newer one). Extend the "opencl" package config to include both
> implementations into the libopencl-mesa (-dev) packages. As the Clover
> implementation is in maintenance mode and is expected to be removed at
> some point, it doesn't make sense to split the packages or to provide
> two config options.
>
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> [DB: reworked rust class inheritance]
> [DB: merged "rusticl" and "clover" back to "opencl"]
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index efbce5caade5..a192562a7935 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -48,6 +48,12 @@ PROVIDES = " \
>
> inherit meson pkgconfig python3native gettext features_check
>
> +# We can not include rust conditionally, otherwise it can not be overriden by
> +# the bbappends. Instead always include it, but remove the dependencies by
> +# default.
> +inherit rust
> +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> +
I'd really prefer not to have the rust inherit unconditionally. I have
some ideas about how we could fix this in bitbake so we may need to
wait for that if we can't avoid the PACKAGECONFIG issue from appends...
Cheers,
Richard
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2023-12-30 21:02 ` [OE-core] " Richard Purdie
@ 2024-01-02 10:32 ` Dmitry Baryshkov
2024-01-02 11:40 ` Richard Purdie
2024-01-23 14:34 ` Antoine Coutant
1 sibling, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-02 10:32 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core, Zoltán Böszörményi
On Sat, 30 Dec 2023 at 23:02, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> > From: Zoltán Böszörményi <zboszor@gmail.com>
> >
> > Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> > (newer one). Extend the "opencl" package config to include both
> > implementations into the libopencl-mesa (-dev) packages. As the Clover
> > implementation is in maintenance mode and is expected to be removed at
> > some point, it doesn't make sense to split the packages or to provide
> > two config options.
> >
> > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > [DB: reworked rust class inheritance]
> > [DB: merged "rusticl" and "clover" back to "opencl"]
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> > 1 file changed, 16 insertions(+), 5 deletions(-)
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > index efbce5caade5..a192562a7935 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -48,6 +48,12 @@ PROVIDES = " \
> >
> > inherit meson pkgconfig python3native gettext features_check
> >
> > +# We can not include rust conditionally, otherwise it can not be overriden by
> > +# the bbappends. Instead always include it, but remove the dependencies by
> > +# default.
> > +inherit rust
> > +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> > +
>
> I'd really prefer not to have the rust inherit unconditionally. I have
> some ideas about how we could fix this in bitbake so we may need to
> wait for that if we can't avoid the PACKAGECONFIG issue from appends...
Well, it's not just appends. Extending PACKAGECONFIG from local.conf
also doesn't work. In fact even adding "opencl" to the default
PACKAGECONFIG doesn't work unless I move `inherit
@{bb.utils.contains....` after the PACKAGECONFIG definition. Using
`INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
drawback of including rust unconditionally.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-02 10:32 ` Dmitry Baryshkov
@ 2024-01-02 11:40 ` Richard Purdie
2024-01-02 15:25 ` Dmitry Baryshkov
0 siblings, 1 reply; 15+ messages in thread
From: Richard Purdie @ 2024-01-02 11:40 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: openembedded-core, Zoltán Böszörményi
On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
> On Sat, 30 Dec 2023 at 23:02, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> > > From: Zoltán Böszörményi <zboszor@gmail.com>
> > >
> > > Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> > > (newer one). Extend the "opencl" package config to include both
> > > implementations into the libopencl-mesa (-dev) packages. As the Clover
> > > implementation is in maintenance mode and is expected to be removed at
> > > some point, it doesn't make sense to split the packages or to provide
> > > two config options.
> > >
> > > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > > [DB: reworked rust class inheritance]
> > > [DB: merged "rusticl" and "clover" back to "opencl"]
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > ---
> > > meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> > > 1 file changed, 16 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > > index efbce5caade5..a192562a7935 100644
> > > --- a/meta/recipes-graphics/mesa/mesa.inc
> > > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > > @@ -48,6 +48,12 @@ PROVIDES = " \
> > >
> > > inherit meson pkgconfig python3native gettext features_check
> > >
> > > +# We can not include rust conditionally, otherwise it can not be overriden by
> > > +# the bbappends. Instead always include it, but remove the dependencies by
> > > +# default.
> > > +inherit rust
> > > +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> > > +
> >
> > I'd really prefer not to have the rust inherit unconditionally. I have
> > some ideas about how we could fix this in bitbake so we may need to
> > wait for that if we can't avoid the PACKAGECONFIG issue from appends...
>
> Well, it's not just appends. Extending PACKAGECONFIG from local.conf
> also doesn't work. In fact even adding "opencl" to the default
> PACKAGECONFIG doesn't work unless I move `inherit
> @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
> `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
> drawback of including rust unconditionally.
PACKAGECONFIG:append:pn-mesa = " opencl"
should work from local.conf?
Cheers,
Richard
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-02 11:40 ` Richard Purdie
@ 2024-01-02 15:25 ` Dmitry Baryshkov
2024-01-02 15:29 ` Richard Purdie
0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-02 15:25 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core, Zoltán Böszörményi
On Tue, 2 Jan 2024 at 13:40, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
> > On Sat, 30 Dec 2023 at 23:02, Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> > > > From: Zoltán Böszörményi <zboszor@gmail.com>
> > > >
> > > > Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> > > > (newer one). Extend the "opencl" package config to include both
> > > > implementations into the libopencl-mesa (-dev) packages. As the Clover
> > > > implementation is in maintenance mode and is expected to be removed at
> > > > some point, it doesn't make sense to split the packages or to provide
> > > > two config options.
> > > >
> > > > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > > > [DB: reworked rust class inheritance]
> > > > [DB: merged "rusticl" and "clover" back to "opencl"]
> > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > > ---
> > > > meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> > > > 1 file changed, 16 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > > > index efbce5caade5..a192562a7935 100644
> > > > --- a/meta/recipes-graphics/mesa/mesa.inc
> > > > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > > > @@ -48,6 +48,12 @@ PROVIDES = " \
> > > >
> > > > inherit meson pkgconfig python3native gettext features_check
> > > >
> > > > +# We can not include rust conditionally, otherwise it can not be overriden by
> > > > +# the bbappends. Instead always include it, but remove the dependencies by
> > > > +# default.
> > > > +inherit rust
> > > > +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> > > > +
> > >
> > > I'd really prefer not to have the rust inherit unconditionally. I have
> > > some ideas about how we could fix this in bitbake so we may need to
> > > wait for that if we can't avoid the PACKAGECONFIG issue from appends...
> >
> > Well, it's not just appends. Extending PACKAGECONFIG from local.conf
> > also doesn't work. In fact even adding "opencl" to the default
> > PACKAGECONFIG doesn't work unless I move `inherit
> > @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
> > `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
> > drawback of including rust unconditionally.
>
> PACKAGECONFIG:append:pn-mesa = " opencl"
Yes, I tried that. I got an error about rust tools not being defined.
I think the :append: and overrides are handled after the inherit
argument is handled. So it is either PACKAGECONFIG being fully defined
before inherit (literally before), or inherit ends up with an empty
argument.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-02 15:25 ` Dmitry Baryshkov
@ 2024-01-02 15:29 ` Richard Purdie
2024-01-02 22:57 ` Dmitry Baryshkov
0 siblings, 1 reply; 15+ messages in thread
From: Richard Purdie @ 2024-01-02 15:29 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: openembedded-core, Zoltán Böszörményi
On Tue, 2024-01-02 at 17:25 +0200, Dmitry Baryshkov wrote:
> On Tue, 2 Jan 2024 at 13:40, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
> > > On Sat, 30 Dec 2023 at 23:02, Richard Purdie
> > > <richard.purdie@linuxfoundation.org> wrote:
> > > >
> > > > On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> > > > > From: Zoltán Böszörményi <zboszor@gmail.com>
> > > > >
> > > > > Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> > > > > (newer one). Extend the "opencl" package config to include both
> > > > > implementations into the libopencl-mesa (-dev) packages. As the Clover
> > > > > implementation is in maintenance mode and is expected to be removed at
> > > > > some point, it doesn't make sense to split the packages or to provide
> > > > > two config options.
> > > > >
> > > > > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > > > > [DB: reworked rust class inheritance]
> > > > > [DB: merged "rusticl" and "clover" back to "opencl"]
> > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > > > ---
> > > > > meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> > > > > 1 file changed, 16 insertions(+), 5 deletions(-)
> > > > >
> > > > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > > > > index efbce5caade5..a192562a7935 100644
> > > > > --- a/meta/recipes-graphics/mesa/mesa.inc
> > > > > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > > > > @@ -48,6 +48,12 @@ PROVIDES = " \
> > > > >
> > > > > inherit meson pkgconfig python3native gettext features_check
> > > > >
> > > > > +# We can not include rust conditionally, otherwise it can not be overriden by
> > > > > +# the bbappends. Instead always include it, but remove the dependencies by
> > > > > +# default.
> > > > > +inherit rust
> > > > > +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> > > > > +
> > > >
> > > > I'd really prefer not to have the rust inherit unconditionally. I have
> > > > some ideas about how we could fix this in bitbake so we may need to
> > > > wait for that if we can't avoid the PACKAGECONFIG issue from appends...
> > >
> > > Well, it's not just appends. Extending PACKAGECONFIG from local.conf
> > > also doesn't work. In fact even adding "opencl" to the default
> > > PACKAGECONFIG doesn't work unless I move `inherit
> > > @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
> > > `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
> > > drawback of including rust unconditionally.
> >
> > PACKAGECONFIG:append:pn-mesa = " opencl"
>
> Yes, I tried that. I got an error about rust tools not being defined.
> I think the :append: and overrides are handled after the inherit
> argument is handled. So it is either PACKAGECONFIG being fully defined
> before inherit (literally before), or inherit ends up with an empty
> argument.
The append and overrides would be expanded at the time the expression
in the inherit statement is evaluated so if that didn't work there is
something else at play...
Cheers,
Richard
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-02 15:29 ` Richard Purdie
@ 2024-01-02 22:57 ` Dmitry Baryshkov
2024-01-12 10:21 ` Böszörményi Zoltán
0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-02 22:57 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core, Zoltán Böszörményi
On Tue, 2 Jan 2024 at 17:30, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2024-01-02 at 17:25 +0200, Dmitry Baryshkov wrote:
> > On Tue, 2 Jan 2024 at 13:40, Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
> > > > On Sat, 30 Dec 2023 at 23:02, Richard Purdie
> > > > <richard.purdie@linuxfoundation.org> wrote:
> > > > >
> > > > > On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> > > > > > From: Zoltán Böszörményi <zboszor@gmail.com>
> > > > > >
> > > > > > Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> > > > > > (newer one). Extend the "opencl" package config to include both
> > > > > > implementations into the libopencl-mesa (-dev) packages. As the Clover
> > > > > > implementation is in maintenance mode and is expected to be removed at
> > > > > > some point, it doesn't make sense to split the packages or to provide
> > > > > > two config options.
> > > > > >
> > > > > > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > > > > > [DB: reworked rust class inheritance]
> > > > > > [DB: merged "rusticl" and "clover" back to "opencl"]
> > > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > > > > ---
> > > > > > meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> > > > > > 1 file changed, 16 insertions(+), 5 deletions(-)
> > > > > >
> > > > > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > > > > > index efbce5caade5..a192562a7935 100644
> > > > > > --- a/meta/recipes-graphics/mesa/mesa.inc
> > > > > > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > > > > > @@ -48,6 +48,12 @@ PROVIDES = " \
> > > > > >
> > > > > > inherit meson pkgconfig python3native gettext features_check
> > > > > >
> > > > > > +# We can not include rust conditionally, otherwise it can not be overriden by
> > > > > > +# the bbappends. Instead always include it, but remove the dependencies by
> > > > > > +# default.
> > > > > > +inherit rust
> > > > > > +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> > > > > > +
> > > > >
> > > > > I'd really prefer not to have the rust inherit unconditionally. I have
> > > > > some ideas about how we could fix this in bitbake so we may need to
> > > > > wait for that if we can't avoid the PACKAGECONFIG issue from appends...
> > > >
> > > > Well, it's not just appends. Extending PACKAGECONFIG from local.conf
> > > > also doesn't work. In fact even adding "opencl" to the default
> > > > PACKAGECONFIG doesn't work unless I move `inherit
> > > > @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
> > > > `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
> > > > drawback of including rust unconditionally.
> > >
> > > PACKAGECONFIG:append:pn-mesa = " opencl"
> >
> > Yes, I tried that. I got an error about rust tools not being defined.
> > I think the :append: and overrides are handled after the inherit
> > argument is handled. So it is either PACKAGECONFIG being fully defined
> > before inherit (literally before), or inherit ends up with an empty
> > argument.
>
> The append and overrides would be expanded at the time the expression
> in the inherit statement is evaluated so if that didn't work there is
> something else at play...
I did not attempt debugging the bitbake itself. However I can see that
with this line in local.conf, PACKAGECONFIG is updated, but the RUSTC
is not defined (which means that rust.bbclass was not inherited). Then
I tried adding opencl to the default PACKAGECONFIG in mesa.inc. If
inherit comes before PACKAGECONFIG being set, it is not honoured. If
inherit comes after PACKAGECONFIG, it works as expected (and RUSTC
gets defined).
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-02 22:57 ` Dmitry Baryshkov
@ 2024-01-12 10:21 ` Böszörményi Zoltán
2024-01-13 6:12 ` Dmitry Baryshkov
0 siblings, 1 reply; 15+ messages in thread
From: Böszörményi Zoltán @ 2024-01-12 10:21 UTC (permalink / raw)
To: Dmitry Baryshkov, Richard Purdie; +Cc: openembedded-core
2024. 01. 02. 23:57 keltezéssel, Dmitry Baryshkov írta:
> On Tue, 2 Jan 2024 at 17:30, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> On Tue, 2024-01-02 at 17:25 +0200, Dmitry Baryshkov wrote:
>>> On Tue, 2 Jan 2024 at 13:40, Richard Purdie
>>> <richard.purdie@linuxfoundation.org> wrote:
>>>> On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
>>>>> On Sat, 30 Dec 2023 at 23:02, Richard Purdie
>>>>> <richard.purdie@linuxfoundation.org> wrote:
>>>>>> On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
>>>>>>> From: Zoltán Böszörményi <zboszor@gmail.com>
>>>>>>>
>>>>>>> Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
>>>>>>> (newer one). Extend the "opencl" package config to include both
>>>>>>> implementations into the libopencl-mesa (-dev) packages. As the Clover
>>>>>>> implementation is in maintenance mode and is expected to be removed at
>>>>>>> some point, it doesn't make sense to split the packages or to provide
>>>>>>> two config options.
>>>>>>>
>>>>>>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>>>>>>> [DB: reworked rust class inheritance]
>>>>>>> [DB: merged "rusticl" and "clover" back to "opencl"]
>>>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>>>> ---
>>>>>>> meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
>>>>>>> 1 file changed, 16 insertions(+), 5 deletions(-)
>>>>>>>
>>>>>>> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>>>>>>> index efbce5caade5..a192562a7935 100644
>>>>>>> --- a/meta/recipes-graphics/mesa/mesa.inc
>>>>>>> +++ b/meta/recipes-graphics/mesa/mesa.inc
>>>>>>> @@ -48,6 +48,12 @@ PROVIDES = " \
>>>>>>>
>>>>>>> inherit meson pkgconfig python3native gettext features_check
>>>>>>>
>>>>>>> +# We can not include rust conditionally, otherwise it can not be overriden by
>>>>>>> +# the bbappends. Instead always include it, but remove the dependencies by
>>>>>>> +# default.
>>>>>>> +inherit rust
>>>>>>> +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
>>>>>>> +
>>>>>> I'd really prefer not to have the rust inherit unconditionally. I have
>>>>>> some ideas about how we could fix this in bitbake so we may need to
>>>>>> wait for that if we can't avoid the PACKAGECONFIG issue from appends...
>>>>> Well, it's not just appends. Extending PACKAGECONFIG from local.conf
>>>>> also doesn't work. In fact even adding "opencl" to the default
>>>>> PACKAGECONFIG doesn't work unless I move `inherit
>>>>> @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
>>>>> `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
>>>>> drawback of including rust unconditionally.
>>>> PACKAGECONFIG:append:pn-mesa = " opencl"
>>> Yes, I tried that. I got an error about rust tools not being defined.
>>> I think the :append: and overrides are handled after the inherit
>>> argument is handled. So it is either PACKAGECONFIG being fully defined
>>> before inherit (literally before), or inherit ends up with an empty
>>> argument.
>> The append and overrides would be expanded at the time the expression
>> in the inherit statement is evaluated so if that didn't work there is
>> something else at play...
> I did not attempt debugging the bitbake itself. However I can see that
> with this line in local.conf, PACKAGECONFIG is updated, but the RUSTC
> is not defined (which means that rust.bbclass was not inherited). Then
> I tried adding opencl to the default PACKAGECONFIG in mesa.inc. If
> inherit comes before PACKAGECONFIG being set, it is not honoured. If
> inherit comes after PACKAGECONFIG, it works as expected (and RUSTC
> gets defined).
Something like this should work:
inherit ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'rust', '', d)}
E.g. the libxml2 recipe does it, although for a different bbclass.
Best regards,
Zoltán Böszörményi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-12 10:21 ` Böszörményi Zoltán
@ 2024-01-13 6:12 ` Dmitry Baryshkov
2024-01-15 9:58 ` Böszörményi Zoltán
0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-13 6:12 UTC (permalink / raw)
To: Böszörményi Zoltán; +Cc: Richard Purdie, openembedded-core
On Fri, 12 Jan 2024 at 12:21, Böszörményi Zoltán <zboszor@gmail.com> wrote:
>
> 2024. 01. 02. 23:57 keltezéssel, Dmitry Baryshkov írta:
> > On Tue, 2 Jan 2024 at 17:30, Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> >> On Tue, 2024-01-02 at 17:25 +0200, Dmitry Baryshkov wrote:
> >>> On Tue, 2 Jan 2024 at 13:40, Richard Purdie
> >>> <richard.purdie@linuxfoundation.org> wrote:
> >>>> On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
> >>>>> On Sat, 30 Dec 2023 at 23:02, Richard Purdie
> >>>>> <richard.purdie@linuxfoundation.org> wrote:
> >>>>>> On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
> >>>>>>> From: Zoltán Böszörményi <zboszor@gmail.com>
> >>>>>>>
> >>>>>>> Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
> >>>>>>> (newer one). Extend the "opencl" package config to include both
> >>>>>>> implementations into the libopencl-mesa (-dev) packages. As the Clover
> >>>>>>> implementation is in maintenance mode and is expected to be removed at
> >>>>>>> some point, it doesn't make sense to split the packages or to provide
> >>>>>>> two config options.
> >>>>>>>
> >>>>>>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> >>>>>>> [DB: reworked rust class inheritance]
> >>>>>>> [DB: merged "rusticl" and "clover" back to "opencl"]
> >>>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>>>>>> ---
> >>>>>>> meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
> >>>>>>> 1 file changed, 16 insertions(+), 5 deletions(-)
> >>>>>>>
> >>>>>>> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> >>>>>>> index efbce5caade5..a192562a7935 100644
> >>>>>>> --- a/meta/recipes-graphics/mesa/mesa.inc
> >>>>>>> +++ b/meta/recipes-graphics/mesa/mesa.inc
> >>>>>>> @@ -48,6 +48,12 @@ PROVIDES = " \
> >>>>>>>
> >>>>>>> inherit meson pkgconfig python3native gettext features_check
> >>>>>>>
> >>>>>>> +# We can not include rust conditionally, otherwise it can not be overriden by
> >>>>>>> +# the bbappends. Instead always include it, but remove the dependencies by
> >>>>>>> +# default.
> >>>>>>> +inherit rust
> >>>>>>> +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
> >>>>>>> +
> >>>>>> I'd really prefer not to have the rust inherit unconditionally. I have
> >>>>>> some ideas about how we could fix this in bitbake so we may need to
> >>>>>> wait for that if we can't avoid the PACKAGECONFIG issue from appends...
> >>>>> Well, it's not just appends. Extending PACKAGECONFIG from local.conf
> >>>>> also doesn't work. In fact even adding "opencl" to the default
> >>>>> PACKAGECONFIG doesn't work unless I move `inherit
> >>>>> @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
> >>>>> `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
> >>>>> drawback of including rust unconditionally.
> >>>> PACKAGECONFIG:append:pn-mesa = " opencl"
> >>> Yes, I tried that. I got an error about rust tools not being defined.
> >>> I think the :append: and overrides are handled after the inherit
> >>> argument is handled. So it is either PACKAGECONFIG being fully defined
> >>> before inherit (literally before), or inherit ends up with an empty
> >>> argument.
> >> The append and overrides would be expanded at the time the expression
> >> in the inherit statement is evaluated so if that didn't work there is
> >> something else at play...
> > I did not attempt debugging the bitbake itself. However I can see that
> > with this line in local.conf, PACKAGECONFIG is updated, but the RUSTC
> > is not defined (which means that rust.bbclass was not inherited). Then
> > I tried adding opencl to the default PACKAGECONFIG in mesa.inc. If
> > inherit comes before PACKAGECONFIG being set, it is not honoured. If
> > inherit comes after PACKAGECONFIG, it works as expected (and RUSTC
> > gets defined).
>
> Something like this should work:
>
> inherit ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'rust', '', d)}
>
> E.g. the libxml2 recipe does it, although for a different bbclass.
This way enabling opencl in .bbappend is not honoured.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2024-01-13 6:12 ` Dmitry Baryshkov
@ 2024-01-15 9:58 ` Böszörményi Zoltán
0 siblings, 0 replies; 15+ messages in thread
From: Böszörményi Zoltán @ 2024-01-15 9:58 UTC (permalink / raw)
To: Dmitry Baryshkov; +Cc: Richard Purdie, openembedded-core
2024. 01. 13. 7:12 keltezéssel, Dmitry Baryshkov írta:
> On Fri, 12 Jan 2024 at 12:21, Böszörményi Zoltán <zboszor@gmail.com> wrote:
>> 2024. 01. 02. 23:57 keltezéssel, Dmitry Baryshkov írta:
>>> On Tue, 2 Jan 2024 at 17:30, Richard Purdie
>>> <richard.purdie@linuxfoundation.org> wrote:
>>>> On Tue, 2024-01-02 at 17:25 +0200, Dmitry Baryshkov wrote:
>>>>> On Tue, 2 Jan 2024 at 13:40, Richard Purdie
>>>>> <richard.purdie@linuxfoundation.org> wrote:
>>>>>> On Tue, 2024-01-02 at 12:32 +0200, Dmitry Baryshkov wrote:
>>>>>>> On Sat, 30 Dec 2023 at 23:02, Richard Purdie
>>>>>>> <richard.purdie@linuxfoundation.org> wrote:
>>>>>>>> On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
>>>>>>>>> From: Zoltán Böszörményi <zboszor@gmail.com>
>>>>>>>>>
>>>>>>>>> Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
>>>>>>>>> (newer one). Extend the "opencl" package config to include both
>>>>>>>>> implementations into the libopencl-mesa (-dev) packages. As the Clover
>>>>>>>>> implementation is in maintenance mode and is expected to be removed at
>>>>>>>>> some point, it doesn't make sense to split the packages or to provide
>>>>>>>>> two config options.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>>>>>>>>> [DB: reworked rust class inheritance]
>>>>>>>>> [DB: merged "rusticl" and "clover" back to "opencl"]
>>>>>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>>>>>> ---
>>>>>>>>> meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
>>>>>>>>> 1 file changed, 16 insertions(+), 5 deletions(-)
>>>>>>>>>
>>>>>>>>> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>>>>>>>>> index efbce5caade5..a192562a7935 100644
>>>>>>>>> --- a/meta/recipes-graphics/mesa/mesa.inc
>>>>>>>>> +++ b/meta/recipes-graphics/mesa/mesa.inc
>>>>>>>>> @@ -48,6 +48,12 @@ PROVIDES = " \
>>>>>>>>>
>>>>>>>>> inherit meson pkgconfig python3native gettext features_check
>>>>>>>>>
>>>>>>>>> +# We can not include rust conditionally, otherwise it can not be overriden by
>>>>>>>>> +# the bbappends. Instead always include it, but remove the dependencies by
>>>>>>>>> +# default.
>>>>>>>>> +inherit rust
>>>>>>>>> +INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
>>>>>>>>> +
>>>>>>>> I'd really prefer not to have the rust inherit unconditionally. I have
>>>>>>>> some ideas about how we could fix this in bitbake so we may need to
>>>>>>>> wait for that if we can't avoid the PACKAGECONFIG issue from appends...
>>>>>>> Well, it's not just appends. Extending PACKAGECONFIG from local.conf
>>>>>>> also doesn't work. In fact even adding "opencl" to the default
>>>>>>> PACKAGECONFIG doesn't work unless I move `inherit
>>>>>>> @{bb.utils.contains....` after the PACKAGECONFIG definition. Using
>>>>>>> `INHIBIT_DEFAULT_RUST_DEPS` works around that issue, but yes, it has a
>>>>>>> drawback of including rust unconditionally.
>>>>>> PACKAGECONFIG:append:pn-mesa = " opencl"
>>>>> Yes, I tried that. I got an error about rust tools not being defined.
>>>>> I think the :append: and overrides are handled after the inherit
>>>>> argument is handled. So it is either PACKAGECONFIG being fully defined
>>>>> before inherit (literally before), or inherit ends up with an empty
>>>>> argument.
>>>> The append and overrides would be expanded at the time the expression
>>>> in the inherit statement is evaluated so if that didn't work there is
>>>> something else at play...
>>> I did not attempt debugging the bitbake itself. However I can see that
>>> with this line in local.conf, PACKAGECONFIG is updated, but the RUSTC
>>> is not defined (which means that rust.bbclass was not inherited). Then
>>> I tried adding opencl to the default PACKAGECONFIG in mesa.inc. If
>>> inherit comes before PACKAGECONFIG being set, it is not honoured. If
>>> inherit comes after PACKAGECONFIG, it works as expected (and RUSTC
>>> gets defined).
>> Something like this should work:
>>
>> inherit ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'rust', '', d)}
>>
>> E.g. the libxml2 recipe does it, although for a different bbclass.
> This way enabling opencl in .bbappend is not honoured.
Yes, I remember now, that's what I was fighting with, too. Pity.
I wonder why, though. Isn't the .bb and all .bbappend files
loaded, merged then parsed as a whole entity with the variable
dependency graph used for the inherit lines?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [OE-core] [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl"
2023-12-30 21:02 ` [OE-core] " Richard Purdie
2024-01-02 10:32 ` Dmitry Baryshkov
@ 2024-01-23 14:34 ` Antoine Coutant
1 sibling, 0 replies; 15+ messages in thread
From: Antoine Coutant @ 2024-01-23 14:34 UTC (permalink / raw)
To: Richard Purdie, Dmitry Baryshkov, openembedded-core
Cc: Zoltán Böszörményi
[-- Attachment #1: Type: text/plain, Size: 3317 bytes --]
On 30/12/2023 22:02, Richard Purdie wrote:
> On Sat, 2023-12-30 at 21:14 +0200, Dmitry Baryshkov wrote:
>> From: Zoltán Böszörményi<zboszor@gmail.com>
>>
>> Mesa now has two OpenCL implementations: Clover (older one) and RustiCL
>> (newer one). Extend the "opencl" package config to include both
>> implementations into the libopencl-mesa (-dev) packages. As the Clover
>> implementation is in maintenance mode and is expected to be removed at
>> some point, it doesn't make sense to split the packages or to provide
>> two config options.
>>
>> Signed-off-by: Zoltán Böszörményi<zboszor@gmail.com>
>> [DB: reworked rust class inheritance]
>> [DB: merged "rusticl" and "clover" back to "opencl"]
>> Signed-off-by: Dmitry Baryshkov<dmitry.baryshkov@linaro.org>
>> ---
>> meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++++++-----
>> 1 file changed, 16 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>> index efbce5caade5..a192562a7935 100644
>> --- a/meta/recipes-graphics/mesa/mesa.inc
>> +++ b/meta/recipes-graphics/mesa/mesa.inc
>> @@ -48,6 +48,12 @@ PROVIDES = " \
>>
>> inherit meson pkgconfig python3native gettext features_check
>>
>> +# We can not include rust conditionally, otherwise it can not be overriden by
>> +# the bbappends. Instead always include it, but remove the dependencies by
>> +# default.
>> +inherit rust
>> +INHIBIT_DEFAULT_RUST_DEPS ="${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
>> +
> I'd really prefer not to have the rust inherit unconditionally. I have
> some ideas about how we could fix this in bitbake so we may need to
> wait for that if we can't avoid the PACKAGECONFIG issue from appends...
>
> Cheers,
>
> Richard
>
Richard, All,
Thanks for your work.
I tried to build rusticl with inherit_defer[1][2]. Inherit_defer worked
well but I got an error message:
ERROR: mesa-native-2_23.3.2-r0 do_prepare_recipe_sysroot: The file
/usr/bin/llvm-tblgen17.0.6 is installed by both llvm-native and
clang-native, aborting
It seems that llvm-native and clang-native are in conflict. llvm-native
is a dependency of mesa-native. clang-native is inherited from the
rust-llvm recipe (this inheritance is added by rust-llvm_%.bbappend in
meta-clang).
Here is my configuration:
Build Configuration:
BB_VERSION = "2.7.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "qemux86-64"
DISTRO = "poky"
DISTRO_VERSION = "4.3+snapshot-5ed5d717f122078dd908cce86a0c625c2c64f32a"
TUNE_FEATURES = "m64 core2"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "master:5ed5d717f122078dd908cce86a0c625c2c64f32a"
meta-clang = "master:beffde692f3d365678f5fdf60b473b93045d4161"
I also tried the build on the Nanbield version and I got the same message.
[1] :
https://git.yoctoproject.org/poky/commit/?h=master-next&id=859832795040ad04d6136732e4275da443409110
<https://git.yoctoproject.org/poky/commit/?h=master-next&id=859832795040ad04d6136732e4275da443409110>
[2] :
https://git.yoctoproject.org/poky/commit/?h=master-next&id=7ef978a7e66d5ebd2986b890488eeb52d4e2af2e
<https://git.yoctoproject.org/poky/commit/?h=master-next&id=7ef978a7e66d5ebd2986b890488eeb52d4e2af2e>
---
Regards,
Antoine Coutant
[-- Attachment #2: Type: text/html, Size: 20915 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 3/3] mesa: fix building of RustiCL + nouveau
2023-12-30 19:14 ` [PATCH v5 3/3] mesa: fix building of RustiCL + nouveau Dmitry Baryshkov
@ 2024-01-23 14:34 ` Antoine Coutant
0 siblings, 0 replies; 15+ messages in thread
From: Antoine Coutant @ 2024-01-23 14:34 UTC (permalink / raw)
To: Dmitry Baryshkov, openembedded-core
Cc: Zoltán Böszörményi
[-- Attachment #1: Type: text/plain, Size: 10401 bytes --]
On 30/12/2023 20:14, Dmitry Baryshkov wrote:
> Incorporate a patch by Karol Herbst, fixing nouveau / libgalliumvl
> dependency.
>
> Signed-off-by: Dmitry Baryshkov<dmitry.baryshkov@linaro.org>
> ---
> meta/recipes-graphics/mesa/files/26680.patch | 236 +++++++++++++++++++
> meta/recipes-graphics/mesa/mesa.inc | 1 +
> 2 files changed, 237 insertions(+)
> create mode 100644 meta/recipes-graphics/mesa/files/26680.patch
>
> diff --git a/meta/recipes-graphics/mesa/files/26680.patch b/meta/recipes-graphics/mesa/files/26680.patch
> new file mode 100644
> index 000000000000..a42b7667edee
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/files/26680.patch
> @@ -0,0 +1,236 @@
> +From daf4935359cb3c88606536924e346ead5e4b2137 Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Thu, 14 Dec 2023 03:19:34 +0100
> +Subject: [PATCH 1/7] gallium/vl: stub vl_video_buffer_create_as_resource
> +
> +It's used by radeonsi
> +
> +Signed-off-by: Karol Herbst<kherbst@redhat.com>
> +Upstream-Status: Pending [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680]
> +---
> + src/gallium/auxiliary/vl/vl_stubs.c | 10 ++++++++++
> + 1 file changed, 10 insertions(+)
> +
> +diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c
> +index 194e7a8700b6b..89e5f28128909 100644
> +--- a/src/gallium/auxiliary/vl/vl_stubs.c
> ++++ b/src/gallium/auxiliary/vl/vl_stubs.c
> +@@ -146,6 +146,16 @@ vl_create_mpeg12_decoder(struct pipe_context *pipe,
> + return NULL;
> + }
> +
> ++struct pipe_video_buffer *
> ++vl_video_buffer_create_as_resource(struct pipe_context *pipe,
> ++ const struct pipe_video_buffer *tmpl,
> ++ const uint64_t *modifiers,
> ++ int modifiers_count)
> ++{
> ++ assert(0);
> ++ return NULL;
> ++}
> ++
> + /*
> + * vl_zscan
> + */
> +--
> +GitLab
> +
> +
> +From 5dd1598b5ac988d3ef53adc9dcb1f2bc1788513c Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Sat, 30 Dec 2023 20:00:33 +0100
> +Subject: [PATCH 2/7] gallium/vl: remove stubs which are already defined in
> + mesa_util
> +
> +---
> + src/gallium/auxiliary/vl/vl_stubs.c | 6 ------
> + 1 file changed, 6 deletions(-)
> +
> +diff --git a/src/gallium/auxiliary/vl/vl_stubs.c b/src/gallium/auxiliary/vl/vl_stubs.c
> +index 89e5f28128909..fcdbd9850428b 100644
> +--- a/src/gallium/auxiliary/vl/vl_stubs.c
> ++++ b/src/gallium/auxiliary/vl/vl_stubs.c
> +@@ -155,9 +155,3 @@ vl_video_buffer_create_as_resource(struct pipe_context *pipe,
> + assert(0);
> + return NULL;
> + }
> +-
> +-/*
> +- * vl_zscan
> +- */
> +-const int vl_zscan_normal[] = {0};
> +-const int vl_zscan_alternate[] = {0};
> +--
> +GitLab
> +
> +
> +From 6df28bce29d34da949f84739f52a5eff7fb01b80 Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Thu, 14 Dec 2023 03:20:08 +0100
> +Subject: [PATCH 3/7] rusticl: link against libgalliumvl_stub
> +
> +---
> + src/gallium/targets/rusticl/meson.build | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build
> +index b2963fe6dfa76..e1acaca7e68e3 100644
> +--- a/src/gallium/targets/rusticl/meson.build
> ++++ b/src/gallium/targets/rusticl/meson.build
> +@@ -42,6 +42,7 @@ librusticl = shared_library(
> + ],
> + link_whole : librusticl,
> + link_with : [
> ++ libgalliumvl_stub,
> + libpipe_loader_static,
> + libswdri,
> + libswkmsdri,
> +--
> +GitLab
> +
> +
> +From b158c041e2b89c73fd16be945286efa7dcf9b75f Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Thu, 14 Dec 2023 03:28:48 +0100
> +Subject: [PATCH 4/7] frontend/nine: link against libgalliumvl_stub
> +
> +---
> + src/gallium/targets/d3dadapter9/meson.build | 9 +--------
> + 1 file changed, 1 insertion(+), 8 deletions(-)
> +
> +diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build
> +index 282859fd93266..c6f1a0dc2a287 100644
> +--- a/src/gallium/targets/d3dadapter9/meson.build
> ++++ b/src/gallium/targets/d3dadapter9/meson.build
> +@@ -27,7 +27,7 @@ gallium_nine_c_args = []
> + gallium_nine_ld_args = []
> + gallium_nine_link_depends = []
> + gallium_nine_link_with = [
> +- libgallium, libnine_st,
> ++ libgallium, libgalliumvl_stub, libnine_st,
> + libpipe_loader_static, libws_null, libwsw, libswdri,
> + libswkmsdri,
> + ]
> +@@ -37,13 +37,6 @@ if with_ld_version_script
> + gallium_nine_link_depends += files('d3dadapter9.sym')
> + endif
> +
> +-if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
> +- with_dri)
> +- gallium_nine_link_with += libgalliumvl
> +-else
> +- gallium_nine_link_with += libgalliumvl_stub
> +-endif
> +-
> + libgallium_nine = shared_library(
> + 'd3dadapter9',
> + files('description.c', 'getproc.c', 'drm.c'),
> +--
> +GitLab
> +
> +
> +From 9d3192871d5038f73317fd2770118dc0ba08e6d4 Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Thu, 14 Dec 2023 03:29:14 +0100
> +Subject: [PATCH 5/7] dri: link against libgalliumvl_stub
> +
> +---
> + src/gallium/targets/dri/meson.build | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
> +index 83925248b17e6..e50581dc121e6 100644
> +--- a/src/gallium/targets/dri/meson.build
> ++++ b/src/gallium/targets/dri/meson.build
> +@@ -50,7 +50,7 @@ libgallium_dri = shared_library(
> + link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args],
> + link_depends : gallium_dri_link_depends,
> + link_with : [
> +- libdri, libmesa, libgalliumvl,
> ++ libdri, libmesa, libgalliumvl_stub,
> + libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
> + libswkmsdri,
> + ],
> +--
> +GitLab
> +
> +
> +From 2039ab261c5fc7f41139514e969ac83e17731cbf Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Thu, 14 Dec 2023 03:29:20 +0100
> +Subject: [PATCH 6/7] wgl: link against libgalliumvl_stub
> +
> +---
> + src/gallium/targets/wgl/meson.build | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build
> +index eaca0aec86b50..6ec171b741a0d 100644
> +--- a/src/gallium/targets/wgl/meson.build
> ++++ b/src/gallium/targets/wgl/meson.build
> +@@ -38,7 +38,7 @@ libgallium_wgl = shared_library(
> + ],
> + link_whole : [libwgl],
> + link_with : [
> +- libgallium, libglsl, libmesa, libwsgdi, libglapi_static, libglapi, libgalliumvl
> ++ libgallium, libglsl, libmesa, libwsgdi, libglapi_static, libglapi, libgalliumvl_stub,
> + ],
> + dependencies : [
> + dep_ws2_32, idep_nir, idep_mesautil, driver_swrast,
> +--
> +GitLab
> +
> +
> +From dac47334c7ae336854991ffb4f564b007abd8585 Mon Sep 17 00:00:00 2001
> +From: Karol Herbst<kherbst@redhat.com>
> +Date: Thu, 14 Dec 2023 03:20:25 +0100
> +Subject: [PATCH 7/7] gallium/drivers: do not link against libgalliumvl
> + directly
> +
> +libgalliumvl_stub was added so not all frontends have to link in full
> +video accleration support, shaving off around 100kB of binary size.
> +---
> + src/gallium/drivers/d3d12/meson.build | 2 +-
> + src/gallium/drivers/r600/meson.build | 1 -
> + src/gallium/drivers/radeonsi/meson.build | 2 +-
> + 3 files changed, 2 insertions(+), 3 deletions(-)
> +
> +diff --git a/src/gallium/drivers/d3d12/meson.build b/src/gallium/drivers/d3d12/meson.build
> +index aba1f3da056f8..c12e8f35267a1 100644
> +--- a/src/gallium/drivers/d3d12/meson.build
> ++++ b/src/gallium/drivers/d3d12/meson.build
> +@@ -133,5 +133,5 @@ libd3d12 = static_library(
> +
> + driver_d3d12 = declare_dependency(
> + compile_args : '-DGALLIUM_D3D12',
> +- link_with : [libd3d12, libgalliumvl],
> ++ link_with : [libd3d12],
> + )
> +diff --git a/src/gallium/drivers/r600/meson.build b/src/gallium/drivers/r600/meson.build
> +index 023719a3a16f2..974b59d4594b9 100644
> +--- a/src/gallium/drivers/r600/meson.build
> ++++ b/src/gallium/drivers/r600/meson.build
> +@@ -185,7 +185,6 @@ libr600 = static_library(
> + inc_src, inc_mapi, inc_mesa, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
> + inc_gallium_drivers,
> + ],
> +- link_with : [ libgalliumvl ],
> + dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers],
> + )
> +
> +diff --git a/src/gallium/drivers/radeonsi/meson.build b/src/gallium/drivers/radeonsi/meson.build
> +index 29afa87c0b654..c89c417b02c08 100644
> +--- a/src/gallium/drivers/radeonsi/meson.build
> ++++ b/src/gallium/drivers/radeonsi/meson.build
> +@@ -168,7 +168,7 @@ libradeonsi = static_library(
> + driver_radeonsi = declare_dependency(
> + compile_args : '-DGALLIUM_RADEONSI',
> + link_with : radeonsi_gfx_libs + [
> +- libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm, libgalliumvl
> ++ libradeonsi, libradeonwinsys, libamdgpuwinsys, libamd_common, libamd_common_llvm
> + ],
> + dependencies : idep_nir,
> + )
> +--
> +GitLab
> +
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index a192562a7935..7cebe45fa2bc 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -18,6 +18,7 @@ SRC_URI ="https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> file://0001-meson.build-check-for-all-linux-host_os-combinations.patch
> \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> file://0001-gallium-Fix-build-with-llvm-17.patch \ +
> file://26680.patch \ "
>
> SRC_URI[sha256sum] = "6e48126d70fdb3f20ffeb246ca0c2e41ffdc835f0663a03d4526b8bf5db41de6"
Dmitry, All,
The patch you added contains 7 commits. I think it would be better to
split it into 7 different patches so 1 commit = 1 patch. Indeed, it
would be simpler to do a rebase if necessary.
This is also what Yocto recommends for kernel patches:
https://docs.yoctoproject.org/kernel-dev/common.html?highlight=applying+patches#applying-patches
<https://docs.yoctoproject.org/kernel-dev/common.html?highlight=applying+patches#applying-patches>
What do you think about it ?
I can do it if you don’t have time.
---
Regards,
Antoine Coutant
[-- Attachment #2: Type: text/html, Size: 14519 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-01-23 14:34 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-30 19:14 [PATCH v5 0/3] mesa: RustiCL support Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 1/3] mesa: drop -Dopencl-native=true Dmitry Baryshkov
2023-12-30 19:14 ` [PATCH v5 2/3] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
2023-12-30 21:02 ` [OE-core] " Richard Purdie
2024-01-02 10:32 ` Dmitry Baryshkov
2024-01-02 11:40 ` Richard Purdie
2024-01-02 15:25 ` Dmitry Baryshkov
2024-01-02 15:29 ` Richard Purdie
2024-01-02 22:57 ` Dmitry Baryshkov
2024-01-12 10:21 ` Böszörményi Zoltán
2024-01-13 6:12 ` Dmitry Baryshkov
2024-01-15 9:58 ` Böszörményi Zoltán
2024-01-23 14:34 ` Antoine Coutant
2023-12-30 19:14 ` [PATCH v5 3/3] mesa: fix building of RustiCL + nouveau Dmitry Baryshkov
2024-01-23 14:34 ` Antoine Coutant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox