From patchwork Sun Feb 26 05:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20147 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 EECCFC64ED6 for ; Sun, 26 Feb 2023 05:08:32 +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.web11.60822.1677388108920747799 for ; Sat, 25 Feb 2023 21:08:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=i1mGUsDv; spf=pass (domain: gmail.com, ip: 209.85.208.48, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f48.google.com with SMTP id f13so13073575edz.6 for ; Sat, 25 Feb 2023 21:08:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=Wt1Uq12uWsI/XOUCC+NvuTVeUo/37gK04N93zMSBAfM=; b=i1mGUsDvIh6iG8gLU+hD05IDp4sgmF9HflFyJbSMh6bw0yqN8uWy2oJO8iey06qoM2 ZjI4LAp0m3gCj02qTs8Ioop7EGPjazRxUl17zu4P/5Y4eTKDWUDBrMazOabMf8UaYR// ekqGacwMu27tpNVCYPfiTVNmdLEBQNd2MMmnYSeJ9xxlx31Ewu7rPgfhDh6YtIfuMJKo CIn540oYi1TbNM/b3yIhyRzwIV+XkA2V8S5M7Oofnph2i2RjjV5OpLbP312ToPt54Clp M9vnSiNQof3NJCvTdhG8kLJXT8d/eLZsqmUEZdrL6JhgMs6D+EVVoKMvqDTI4E0n9TxU ekoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Wt1Uq12uWsI/XOUCC+NvuTVeUo/37gK04N93zMSBAfM=; b=SZJYOE+9Q6alDFYgv6lNa4Qpfb9xLrcSmV4TLIjU9k+DKdJTpRshaYGqdIulQGz634 ksYg2ypk1DwDiJZqL7W17xsgbNw9y6455bkX68+DNKKp0bybC8cS+V0Vn5QGJvaoMnMJ se6X2nTDooP4khM+hpPKGCtnZVgzt8fCAfLvYHABn1ds6JqM07ZrHUBawZQ8vMTQYX1t KbuiXYxPv968yM+3LU44TYuoQ8wTpPi2yy7ROLRnHyzbfR0xHSuzG7eMvcsivu32Y1pC u0zj+lErGmoOTF9/nkkTrH1gMab7KG2k2/QAbmQUYVkYIo1zxamDNFVUjgw3Ks93Jvg7 wFyQ== X-Gm-Message-State: AO0yUKVVFFGGBTonmr4h6K6PZ6/7xR/xUcCkrLkdoZMS+4yY2Fj0QDFo Qbuf5d2qHehNN0cnjd3dmxZciNq3lV/xQkBa X-Google-Smtp-Source: AK7set9//FWRo9OMd2WuhDpFOgBLMS50+2Bjz2jVslUd4XMqWmtRazB8ruqj9wb95GatE7yq6EKviQ== X-Received: by 2002:aa7:d491:0:b0:4ad:7cfe:f0a with SMTP id b17-20020aa7d491000000b004ad7cfe0f0amr20177632edr.34.1677388106854; Sat, 25 Feb 2023 21:08:26 -0800 (PST) Received: from localhost.localdomain (BC24436C.dsl.pool.telekom.hu. [188.36.67.108]) by smtp.gmail.com with ESMTPSA id b27-20020a50ccdb000000b004aef48a8af7sm1546262edj.50.2023.02.25.21.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 21:08:26 -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 v2 1/3] mesa, mesa-gl: 23.0.0 Date: Sun, 26 Feb 2023 06:08:12 +0100 Message-Id: <20230226050814.929055-2-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230226050814.929055-1-zboszor@gmail.com> References: <20230224093850.3393567-1-zboszor@gmail.com> <20230226050814.929055-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 ; Sun, 26 Feb 2023 05:08:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177726 Signed-off-by: Zoltán Böszörményi --- ...-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 0a3dc1dd62..70f9b6fc17 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 Sun Feb 26 05:08:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20146 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 0908BC6FA8E for ; Sun, 26 Feb 2023 05:08:33 +0000 (UTC) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mx.groups.io with SMTP id smtpd.web10.60748.1677388109746945942 for ; Sat, 25 Feb 2023 21:08:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qPNiK2Vy; spf=pass (domain: gmail.com, ip: 209.85.208.46, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f46.google.com with SMTP id ec43so13039481edb.8 for ; Sat, 25 Feb 2023 21:08:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=RCAWX/3B/8NSjUR8wfmFB9vywFzRSxQriHb7PXYxd1c=; b=qPNiK2Vy6GUMNy27z8mpoY3jPxmuJCBnh6ngWs9ZfOu7WfAtUqPZx0ryduyg18fkkL wnL06nJ7Mefzl00iLX6mKvxyQKWxwVEMpp9KCFWJVi1MMytL9TGXUi8BfCva7fBsYCA8 tzvmVREUthnX6VjLXBRrFY4cG/repMJv14/bNisvcz9j+qoQjsf8Y+pjq13hjV2QGphI mFYG+m7qp2guZLhwKTOxRpPmV6eTDz2aIIJwWY3fMUW4glC3sJlXsK+tTK2RwBF1H4Jw cO8zfQoxpgdDCFpOCQHWAFjKQYRmURb7MHLQCnx7H9Weq8c3grZbzq9ohdRftwIzUNcx ikmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=RCAWX/3B/8NSjUR8wfmFB9vywFzRSxQriHb7PXYxd1c=; b=AzsV3mkXbxfwC4aXI8ydO+uhCJLlkQT2D/Ru7ZgaQ6iqf8J0NcOglVtfixoo+rKeMW Eu/yOgcq31fHt6n0tbN9vejy0czszBHeE2oT3CVCLUZpxGTPxmRhe7F3wcEhdqOtAbOJ RzOnsY8AQqYjME2excBn+a9rgEnTT0+1F0v0nKSqCFSx1w4g67Mc+IckObzstm9hSRL9 dxVPIRqquqh+6rpKwlZ4zxzr5UzOiHZeUoouaUmNJ/XdnGkkcvPfnhk1QoNWYbORT0mI yIW0Zr4xX7Cz+s/i0VjCTWMIAqDd0b5Gj5agAEW7DPcErrKeR2WE71s6g+KrYygdql8U NxOA== X-Gm-Message-State: AO0yUKUBz++ww+HTKruMy6sxddZT5588MAG3LRct1aOiIBDYmkjX7oo+ yag8O491V6ooTr4GiRaiB7Z2CD3o4WTM6giF X-Google-Smtp-Source: AK7set9dI6Sq8wCfEq1I113Iz1B7X8T1PlVt/Gs8Z4CnEXEsFO3aboexLwM4adlrFesKxhaGvtYB4Q== X-Received: by 2002:a17:906:8056:b0:872:27cb:9436 with SMTP id x22-20020a170906805600b0087227cb9436mr26094922ejw.43.1677388107787; Sat, 25 Feb 2023 21:08:27 -0800 (PST) Received: from localhost.localdomain (BC24436C.dsl.pool.telekom.hu. [188.36.67.108]) by smtp.gmail.com with ESMTPSA id b27-20020a50ccdb000000b004aef48a8af7sm1546262edj.50.2023.02.25.21.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 21:08:27 -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 v2 2/3] mesa: Rename PACKAGECONFIG "opencl" to "clover" Date: Sun, 26 Feb 2023 06:08:13 +0100 Message-Id: <20230226050814.929055-3-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230226050814.929055-1-zboszor@gmail.com> References: <20230224093850.3393567-1-zboszor@gmail.com> <20230226050814.929055-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 ; Sun, 26 Feb 2023 05:08:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177727 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, 5 insertions(+), 3 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 70f9b6fc17..89e2dc6e90 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -115,9 +115,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] = "" @@ -196,7 +196,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 \ @@ -233,6 +233,8 @@ do_install:append () { # RPROVIDEs/RCONFLICTs on the generic libgl name. python __anonymous() { pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() + if "clover" in pkgconfig: + pkgconfig.append("opencl") suffix = "" if "-native" in d.getVar("PN"): suffix = "-native" From patchwork Sun Feb 26 05:08:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= X-Patchwork-Id: 20145 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 0A72CC7EE30 for ; Sun, 26 Feb 2023 05:08:33 +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.60749.1677388110419964768 for ; Sat, 25 Feb 2023 21:08:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PQsVODLm; spf=pass (domain: gmail.com, ip: 209.85.208.50, mailfrom: zboszor@gmail.com) Received: by mail-ed1-f50.google.com with SMTP id ec43so13039526edb.8 for ; Sat, 25 Feb 2023 21:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=wLHiDIdQ3pqbazJI1gJFPDiAnuM1hUjCdKvKI4krvoY=; b=PQsVODLm8gf6LquM7P9ho0J/rHs839roWFJN/QZB44qo4LzpAUUacXefzKI13x8r9U fThediLFCSuZsPVdL5f9PGQ606w4Na5zVMXE/yXbRp79SlXgnSgbeGMpN8sSiYIkJFbq c2vYoXhgiNzyTKTm7F/Rcsavnij/R/mpZ50Cdws+mfkPW5detDlLw9+FVQCzn5qA+NZu FR0xtxhOT0LN8iwM54Xc9K3BF2Ne/MwRnv0X522Ty0nShyLbOadpmC1VYsMtZjVRjnYp AxmPF30QmdCsslTJOWVH2s+mONn8igU6S+ljhjVg2hoAcSIojkQGv9mMfstkCz1XubN4 5wsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wLHiDIdQ3pqbazJI1gJFPDiAnuM1hUjCdKvKI4krvoY=; b=sjRlaDaECESMiUcdN7bC+mhTQEnUUfX3ehBoRUrquM1ceYE59+dh94ViCyXFWGKszl x0grLdw9BoGXh6r/0tiWAnItZaD7FgZU8OWIUT/AY351DhmvBRky13RACG5gc02eVL2C 50oU+qri0vyogMax+traexlNHVY/MZYbHHbP4nmMYcfLc76Ut7dwd/BNhVAx3kGWoJvV ZiU20Cpb/mtoMeg/qyokMzfuEYyBy8F3oTZN+mR19NxJn9ls++FLP+Bq6uMd/Tq35l7O YlJOb6pPT4hunfW36v9p8gIpT3V5dA58iyLURhgYe2lJ/YsLCbGeQCwHp+twVvkGqwku LNOg== X-Gm-Message-State: AO0yUKWdwtNaoRV2cjjbR9sVijgbzME8nth2UzgsKVEzakqkVSVH9vxg 77h/F79DEqy6+3ywBQ1yWhdfKk2rQq+hloFe X-Google-Smtp-Source: AK7set94lWc307iuEU6CX2aCvywZoC0O9aMMk61PMkbrsXSpKF3rwkr9ZVkVfROX6SR3ZykullaY/w== X-Received: by 2002:a17:907:9629:b0:870:baa6:6762 with SMTP id gb41-20020a170907962900b00870baa66762mr35894289ejc.14.1677388108670; Sat, 25 Feb 2023 21:08:28 -0800 (PST) Received: from localhost.localdomain (BC24436C.dsl.pool.telekom.hu. [188.36.67.108]) by smtp.gmail.com with ESMTPSA id b27-20020a50ccdb000000b004aef48a8af7sm1546262edj.50.2023.02.25.21.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 21:08:28 -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 v2 3/3] mesa: Add PACKAGECONFIG "rusticl" Date: Sun, 26 Feb 2023 06:08:14 +0100 Message-Id: <20230226050814.929055-4-zboszor@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230226050814.929055-1-zboszor@gmail.com> References: <20230224093850.3393567-1-zboszor@gmail.com> <20230226050814.929055-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 ; Sun, 26 Feb 2023 05:08:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177728 Signed-off-by: Zoltán Böszörményi --- meta/recipes-graphics/mesa/mesa.inc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 89e2dc6e90..2fbc1f971e 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" @@ -119,6 +120,13 @@ 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 and spirv-llvm-translator 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" + +# Building "rusticl" runs bindgen. +# This setting is needed by bindgen to dlopen the correct libclang. +export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}" + PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = "" PACKAGECONFIG[freedreno] = "" @@ -197,6 +205,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 \ @@ -233,7 +242,7 @@ do_install:append () { # RPROVIDEs/RCONFLICTs on the generic libgl name. python __anonymous() { pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() - if "clover" in pkgconfig: + if "clover" in pkgconfig or "rusticl" in pkgconfig: pkgconfig.append("opencl") suffix = "" if "-native" in d.getVar("PN"): @@ -305,7 +314,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.*" @@ -319,7 +328,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 \