From patchwork Mon Mar 6 09:11:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 20499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A4D6C6FD1A for ; Mon, 6 Mar 2023 09:11:23 +0000 (UTC) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mx.groups.io with SMTP id smtpd.web10.29152.1678093877538486204 for ; Mon, 06 Mar 2023 01:11:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cBhn9TfM; spf=pass (domain: gmail.com, ip: 209.85.208.50, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f50.google.com with SMTP id k10so11604339edk.13 for ; Mon, 06 Mar 2023 01:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678093875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=glew41WDzydDVuqZTufyolFA3RDucG5JdUy/0rGVb/c=; b=cBhn9TfMtOfS0rC+oZEgX7czZHNNBWie0PuHdrVcNnopZ6efAuzEFpXLL5gMmcSEdV 1+aV2iG985+3oaMeAu80kR8CtHcv9rqYVD/OUh7pSSyMF0ugkbCscCegJsgUjXZlPrEu qW7wV0NIDuojSBJFnEE4H0bkhOKjF/QPZfv3Za1C/IgjIrI/CLcv2eRkVrwJSQtGtlGd xzoeZ8011cxN920iifU7db1CeBQNiQPe3y/mujmsbeqkb2K1ngNGfXiWTwf5ehTVK5J5 wBMg1jeQvliQ9sfqDlQlpIxLV08ESwHxyMDTcmUf3C+GRQLUq9vU9KuAyVsrVwqhdT0W kLLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678093875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=glew41WDzydDVuqZTufyolFA3RDucG5JdUy/0rGVb/c=; b=IdxD+0Cx0/4/PMEJya4VD/6/GhkUOrGJphOjKsObashGXS9HO9WUInlhF04+Xb2Q6x 0sjFF9Vj2H2wrWzgkVKac+P+ff3J76Xtm1QLoTAaT1HaQ8gxn7ZPB//s4YnsOeD1/u3Q 884vJOS74Lpeyeh+7m1TNjMdHn/GduEpF17pZ1HFJZ287mZxQjxE4bWLzdxMU/GpV2Eq KqyQ3tM3aLdT0UD+KMmBdig5I92SHox7cgaCGbthD8eQA3anWO9AVOdwBVmgS6SLB+T5 kca0udKqd8OFWtoQQ+cusyj+pdnShtNJqF+nv5Q1BEFWkm6v+QdOmoIUJTxYw6H0jekh ESgw== X-Gm-Message-State: AO0yUKX/TJvYSZJdv+OO4A/nwZ+ugfynXeOBEm5rLwlvL/Q4/Q0MZTgh LA4fwapvSeDOVHTUFKGGXKDgWctpNvB8Fw== X-Google-Smtp-Source: AK7set/3wkFa6iT1m46TR5dRaN6/2AaLDvK8nSeYrUPGAzONoniN9ZXDgzdhkYKFX+0HBaCdyzk+UQ== X-Received: by 2002:a17:906:3b92:b0:8d6:ed70:991b with SMTP id u18-20020a1709063b9200b008d6ed70991bmr13573202ejf.15.1678093875486; Mon, 06 Mar 2023 01:11:15 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id q2-20020a50cc82000000b004acbda55f6bsm4760953edi.27.2023.03.06.01.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 01:11:15 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Ross Burton , Alexandre Belloni , Alex Kiernan , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm0=?= =?utf-8?b?w6lueWk=?= Subject: [PATCH v3 1/3] mesa, mesa-gl: 23.0.0 Date: Mon, 6 Mar 2023 10:11:06 +0100 Message-Id: <20230306091108.3347363-2-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306091108.3347363-1-zboszor@gmail.com> References: <17474798FA156F5A.18951@lists.openembedded.org> <20230306091108.3347363-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Mar 2023 09:11:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178061 Signed-off-by: Zoltán Böszörményi Acked-by: Otavio Salvador --- ...-backend-fix-gbm-compile-without-dri.patch | 65 ------------------- ...ormat-Check-for-NEON-before-using-it.patch | 16 ++--- .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} | 0 meta/recipes-graphics/mesa/mesa.inc | 3 +- .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} | 0 5 files changed, 9 insertions(+), 75 deletions(-) delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%) rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%) diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch deleted file mode 100644 index 6541671b7a..0000000000 --- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001 -From: Vincent Davis Jr -Date: Wed, 28 Dec 2022 16:28:01 -0600 -Subject: [PATCH] gbm/backend: fix gbm compile without dri - -Upstream-Status: Backport - -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447 -https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60 - -At mesa version 22.2.3 patch wasn't introduced until after. - -Commit introduces a fix that allows for gbm to be built with an empty -backend. There are situation especially in a Yocto/OE cross compilation -environment where you want to build with an empty backend. The particular -situation is as such: - -The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl, -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build -errors such as: - -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend': -| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend' -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4): - undefined reference to `gbm_dri_backend' -| collect2: error: ld returned 1 exit status - -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled - -Add fix to bypasses compilation issue by excluding gbm dri backend. If -HAVE_DRI || HAVE_DRIX not specified. - -Acked-by: David Heidelberg -Signed-off-by: Vincent Davis Jr ---- - src/gbm/main/backend.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c -index 974d0a76a4e..feee0703495 100644 ---- a/src/gbm/main/backend.c -+++ b/src/gbm/main/backend.c -@@ -42,7 +42,9 @@ - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b)) - -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) - extern const struct gbm_backend gbm_dri_backend; -+#endif - - struct gbm_backend_desc { - const char *name; -@@ -51,7 +53,9 @@ struct gbm_backend_desc { - }; - - static const struct gbm_backend_desc builtin_backends[] = { -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) - { "dri", &gbm_dri_backend }, -+#endif - }; - - #define BACKEND_LIB_SUFFIX "_gbm" --- -2.34.1 - diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch index d22ff3c8a8..0bbd518047 100644 --- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch +++ b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch @@ -23,12 +23,12 @@ diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c index c071250..0880984 100644 --- a/src/util/format/u_format.c +++ b/src/util/format/u_format.c -@@ -1184,7 +1184,7 @@ static void +@@ -1187,7 +1187,7 @@ util_format_unpack_table_init(void) { for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) { --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM) +-#if (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) ++#if (DETECT_ARCH_AARCH64 || (DETECT_ARCH_ARM && defined(__ARM_NEON))) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format); if (unpack) { util_format_unpack_table[format] = unpack; @@ -36,12 +36,12 @@ diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_u index a4a5cb1..1e4f794 100644 --- a/src/util/format/u_format_unpack_neon.c +++ b/src/util/format/u_format_unpack_neon.c -@@ -23,7 +23,7 @@ +@@ -24,7 +24,7 @@ + #include "util/detect_arch.h" + #include "util/format/u_format.h" - #include - --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM) +-#if (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) ++#if (DETECT_ARCH_AARCH64 || (DETECT_ARCH_ARM && defined(__ARM_NEON))) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics * unless you tell it "no really". diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb similarity index 100% rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 8a8a057c6b..bbe8ca7875 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -18,10 +18,9 @@ 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-util-format-Check-for-NEON-before-using-it.patch \ - file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ " -SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9" +SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb similarity index 100% rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb From patchwork Mon Mar 6 09:11:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 20497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DCD7C678D4 for ; Mon, 6 Mar 2023 09:11:23 +0000 (UTC) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mx.groups.io with SMTP id smtpd.web10.29153.1678093878036078289 for ; Mon, 06 Mar 2023 01:11:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TSdgK+sT; spf=pass (domain: gmail.com, ip: 209.85.208.48, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f48.google.com with SMTP id u9so35594966edd.2 for ; Mon, 06 Mar 2023 01:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678093876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sUU2xwzmO3okKQktwhDu1Rf36WaFK1Nbv+7OxHRUMgs=; b=TSdgK+sT6Tvz+MVTN2bbPkDaDoo/0zOOwlpHi1ZFfDepJLEdbxZW0wDrbSQ3aYBRRe zkQuM7YIM26eiuR8XSkQPM8VJ19kWax1HPgKF0uLFdORdETvhZbbkU9jcv8OrsgCIb/K 1XJylZFm7aXN0gcU/acHtDx5AJejhYE3XpKi+SrQwckbTAFV3le98gr20Rpio4tti8wg UYSQYpjnqdtsI1cEoA7931fbm+7wscM6v3SuoApl9B3LBsz6MeUeWs38rdwLKfhwryBa q0wI3CyN6MngV6IzhYm6zVtaXs0FYshpPwSmiN31iiH2/Eae6dYNMFhB3200V07zhZXu hOpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678093876; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sUU2xwzmO3okKQktwhDu1Rf36WaFK1Nbv+7OxHRUMgs=; b=5wtIaS64tGgQnEWpNDa7HaUZP6ZP4tyFocBLoJvdUXlj0M1kwP6tFZOA1PsXqn6pJH zFzOKWbfNRDg7+Yqa7zVD4Gywjuc8US7l6xFy8+Ja/EuLASZchf2VZW0k+8T9ucDMPqh ftKzz5jTg0gOYHqkxR5esqVIKzfUlz4/8eoBOqDnU9MLvnJKl06evUps0Yw5L/baaem5 73ZGkFnP+j7QBG04env3ljBD4BGZIUOJWCr4ckKFSqd4EB7gAt+Dk/QiHksfH4+WFNMV +fcN+gQP6ciHNQQcFhM1PfdmucnYqbSgwsXHJApQRtcerO9+N4KfvOpQbg1Q4XAp4GZQ SDQQ== X-Gm-Message-State: AO0yUKW7ocGw7s38Zb9V/KaikgIZvBHVuqaVaitlcNY481cpXb+cipnb ycz0EfAC570bMFPDjiOoYYWuTESPKgL5ZA== X-Google-Smtp-Source: AK7set+gAQJ2oJlqE+IGsg483i+FEk4WINZVTDVHKRzQiy2ueK4MoQLh/T9kfJySNxqlxQpmUTKQPA== X-Received: by 2002:aa7:cd55:0:b0:4bd:11d3:e86f with SMTP id v21-20020aa7cd55000000b004bd11d3e86fmr9384957edw.6.1678093876174; Mon, 06 Mar 2023 01:11:16 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id q2-20020a50cc82000000b004acbda55f6bsm4760953edi.27.2023.03.06.01.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 01:11:15 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Ross Burton , Alexandre Belloni , Alex Kiernan , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm0=?= =?utf-8?b?w6lueWk=?= Subject: [PATCH v3 2/3] mesa: Rename PACKAGECONFIG "opencl" to "clover" Date: Mon, 6 Mar 2023 10:11:07 +0100 Message-Id: <20230306091108.3347363-3-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306091108.3347363-1-zboszor@gmail.com> References: <17474798FA156F5A.18951@lists.openembedded.org> <20230306091108.3347363-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Mar 2023 09:11:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178062 There is another OpenCL frontend called "rusticl" now. Signed-off-by: Zoltán Böszörményi --- meta/recipes-graphics/mesa/mesa.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index bbe8ca7875..ff352822a3 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -132,9 +132,9 @@ 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 +# "clover" 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" +PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools" PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = "" @@ -213,7 +213,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', 'clover', 'libclc spirv-tools', '', d)}" PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libosmesa libosmesa-dev \ @@ -259,7 +259,7 @@ python __anonymous() { ("gles", "libgles1", "libglesv1-cm1"), ("gles", "libgles2", "libglesv2-2"), ("gles", "libgles3",), - ("opencl", "libopencl",)): + ("clover", "libopencl",)): if not p[0] in pkgconfig: continue mlprefix = d.getVar("MLPREFIX") From patchwork Mon Mar 6 09:11:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 20498 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C2B1C61DA4 for ; Mon, 6 Mar 2023 09:11:23 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web11.29199.1678093878647084570 for ; Mon, 06 Mar 2023 01:11:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iUPLWoUa; spf=pass (domain: gmail.com, ip: 209.85.208.43, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id s11so35477556edy.8 for ; Mon, 06 Mar 2023 01:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678093877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jJ/p3mJ/CNIMn/d1u74RklcaHuZxKgONdkPmI8ISDaM=; b=iUPLWoUaFerTCYkuSE6/OZpRjgH13I9tObcQaxLisjYhNRx/R87061u6ku0cpkasg0 +fr6JxB3mbTmCHFIgG6X+fwhgDRSoyZmadLb/nvpyl/7Y97rqq673dMVem+LMac2c8K/ +ddUuBByM8HAT8B0OYHnP6En5b7P847kgfTLlEKGzUVp9TAWKs4fXoptGRpna6UHMfCP J4ptXk7B+buuQtleqdJi27v17ZnCihmucND5m40y3fXR2F9Hfm/d3JJeHsirg18m1kvT tmHkxcUL66tj5Uc2oAmbxCVFH811LVZN6GHartlx54hvtdih5j8mrEv62Fli13Jkd/oG RTZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678093877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jJ/p3mJ/CNIMn/d1u74RklcaHuZxKgONdkPmI8ISDaM=; b=E379Xf4UQnzpqgOQTLksvGmNLXctJiXOhLxZlTvnWDubqZya7dBvSeHfER4sTNPBrL JBfrhTVYgu6Aos9zP7WO6OeGmda+sJRVJBd0WkvAey5t/2/oMrY13VS4ywTeE7o6o8tF 7adxKvvtjPzy05LO1M0BEIlsN4hPojIeAokCi7gpcWfKGA5GvwuR3En/zeIJLorasWCq WvBuPDRarJgDARbL0+DOUN2j7vrVh/n2rG2CGmMVqmNy6TAw/YpIAF3vjKID27xh5LPL musXkg4Cjguc+kwJGuYTCi+J5S14ZfI7N/4G7l5utm6IIH4o2Xx/74odBII3IjsD3wJv 90ww== X-Gm-Message-State: AO0yUKVNJy9ls4d/WxX0SiJL8DG/ApGXUA+QZksN3gsgz7TTveJdUjdD BB4WPjYZqYhNd4ynPjOdCndtceikIytNDA== X-Google-Smtp-Source: AK7set/VUWJuo5cdaZjdJ51s8TNkBm+QfgOVtn2+rDweZTYbhXoJCKe0y/IID+4HMzaCYkU+ez25+Q== X-Received: by 2002:a05:6402:b10:b0:4ab:4011:ff3d with SMTP id bm16-20020a0564020b1000b004ab4011ff3dmr10575532edb.0.1678093876917; Mon, 06 Mar 2023 01:11:16 -0800 (PST) Received: from localhost.lan (BC244571.dsl.pool.telekom.hu. [188.36.69.113]) by smtp.gmail.com with ESMTPSA id q2-20020a50cc82000000b004acbda55f6bsm4760953edi.27.2023.03.06.01.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 01:11:16 -0800 (PST) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Ross Burton , Alexandre Belloni , Alex Kiernan , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm0=?= =?utf-8?b?w6lueWk=?= Subject: [PATCH v3 3/3] mesa: Add PACKAGECONFIG "rusticl" Date: Mon, 6 Mar 2023 10:11:08 +0100 Message-Id: <20230306091108.3347363-4-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306091108.3347363-1-zboszor@gmail.com> References: <17474798FA156F5A.18951@lists.openembedded.org> <20230306091108.3347363-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Mar 2023 09:11:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178063 In the anonymous python function that creates packages based on PACKAGECONFIG, use a single synthetic "opencl" setting that is added when either "clover" or "rusticl" are present. Without this, creating variables for two "libopencl-mesa" will confuse the packaging code, resulting in subsequent packages (like mesa-megadriver and others) being renamed incorrectly. This also makes sense from a packaging standpoint: currently both clover and rusticl can be enabled, in which case both CL frontends should go into the same libopencl-mesa subpackage. Signed-off-by: Zoltán Böszörményi --- meta/recipes-graphics/mesa/mesa.inc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index ff352822a3..56451d9eea 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -46,6 +46,7 @@ PROVIDES = " \ " inherit meson pkgconfig python3native gettext features_check +inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)} BBCLASSEXTEND = "native nativesdk" @@ -136,6 +137,9 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}" PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools" +# "rusticl" requires libclc, spirv-llvm-translator and bindgen-cli-native from meta-clang and spirv-tools from OE-Core +PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator" + PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = "" PACKAGECONFIG[freedreno] = "" @@ -214,6 +218,7 @@ DEV_PKG_DEPENDENCY = "" RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev" RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}" +RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libosmesa libosmesa-dev \ @@ -250,6 +255,11 @@ do_install:append () { # RPROVIDEs/RCONFLICTs on the generic libgl name. python __anonymous() { pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() + # Add the synthetic "opencl" string to pkgconfig because + # both "clover" and "rusticl" would create libopencl-mesa. + # Both CL frontends should go into the same package. + if "clover" in pkgconfig or "rusticl" in pkgconfig: + pkgconfig.append("opencl") suffix = "" if "-native" in d.getVar("PN"): suffix = "-native" @@ -259,7 +269,7 @@ python __anonymous() { ("gles", "libgles1", "libglesv1-cm1"), ("gles", "libgles2", "libglesv2-2"), ("gles", "libgles3",), - ("clover", "libopencl",)): + ("opencl", "libopencl",)): if not p[0] in pkgconfig: continue mlprefix = d.getVar("MLPREFIX") @@ -320,7 +330,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}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd" FILES:libglapi = "${libdir}/libglapi.so.*" FILES:libosmesa = "${libdir}/libOSMesa.so.*" FILES:libxatracker = "${libdir}/libxatracker.so.*" @@ -334,7 +344,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}/libMesaOpenCL.so ${libdir}/libRusticlOpenCL.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 \