From patchwork Sun Jul 19 08:01:06 2026 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: 92810 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 6C1CFC4450A for ; Sun, 19 Jul 2026 08:01:29 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1671.1784448082005281763 for ; Sun, 19 Jul 2026 01:01:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=JD1A/yqR; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: zboszor@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-47f633e6058so1793523f8f.0 for ; Sun, 19 Jul 2026 01:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784448080; x=1785052880; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=450r/B9qx7wA9XDXs0TxZJpd01lL5MbzSQT2iUevacU=; b=JD1A/yqRG2UfFzKcn7w+R0l/duX55nwTNNOQ9oBzwMXFCQTx7I9KHcvv1L6ieiUv8Z YkKh3YO1oTtDM4+fcgsPX+PgHl57sZtB4mj+5xl+kD5h42Nae5HLzPHxGZi17zJSt/0+ QN146yKDqrt1WImfG1vJMyE4V4rNK+CEttCagEQsUXP4ithVpjXnqhhD0fsMhDBUktCb T34LfnEOboTKHGGt5ggbt4vY2R19gO4UaaLHPBXHRb2o6j/8NHLewAKXyk92vQTzrvu7 pjtrXIgjSfFEYhaujeYzZt8yM3gD3ChUFwnA3ENrzPlK86taMh9b4SMDRTABm2i+DbIf qb4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784448080; x=1785052880; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=450r/B9qx7wA9XDXs0TxZJpd01lL5MbzSQT2iUevacU=; b=oqOS8PhJLwaovO/5wEjS+r3+nD/tDdFZXhLg1IjaLSyF1WEDH5kzu9Q3N+IwjLPDSn /1ksm4UbLg2uBBO44HhDEgvRnPxtUYG/kRGOWYcOkP5tIzdzqLdZVzqh1kBm6tIoceyB Z+0pB0kyRYaR0ZCQKuq/j4TntqT6y1vcqvy52R3/7KHLBu5xrifoiH6S4ZH1pdXLU85W CZJSgJ6vJc23vVg2T207knJn91Y0dBIrsYX6aXJUY8RMDED28SS6cmQeTjKe3jXxoyJW ukzOuZbJCw53BNzEuJFvhgfkguMsLlQXUscmm5AWICL3ypgbNdq318xWjW3sArx9TOqC BurQ== X-Gm-Message-State: AOJu0YweLFuTnmzGNRGJmDPscdjlPBdXgngBeFFV0CMJi6vy/jwGolcD dFjhhZQmNQLgfCIzcsyWheAFPA3t5RC/FTco1ATVBqfw1R25ec4FDctdicAkBw== X-Gm-Gg: AfdE7cklWJ4d0wcdAGUhHGGMxEQKh00Y3nsS0bFcOHVeZfU7ibJN6g1RLWsM0f3X1uO Chm0f13iV5y036hjtskywYgt8qE8Ph04Bqb8s/L+es0pHL6vVyNKNY4sgRinVKqc4j7mB9OGXC5 9F10kweDOxQSnuiPXciJLpFl1PO4Zy1nJeqMe0hUN5pu9raqQ4MPi3gBO33Kb025TS0EEafVYbp UJ7qes2r3XwkAgRwISkDkWzho8diIGjsLv82PCyII6GhirDkrfvjN4+58Ctu9gO5msvFKY/a0I0 xp/QroNssyGcJR67EqAan3ujUma8UFjpckcTKKzMll3ujOGBGceuass9cfyF+umMWCBbiRtHdfn Ip7YvaVepPhD87qzO/55XuPHi2Ix8UraHhOlOCJsj5S+8R2hpPjswGU/FlT962S9pD/OjhC/jP/ XWog== X-Received: by 2002:a05:6000:38b:b0:47f:6dec:fc04 with SMTP id ffacd0b85a97d-47f6decfc51mr4450170f8f.29.1784448079775; Sun, 19 Jul 2026 01:01:19 -0700 (PDT) Received: from term011.lan (BC24447B.dsl.pool.telekom.hu. [188.36.68.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e49500sm19221644f8f.2.2026.07.19.01.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2026 01:01:18 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Mathieu Dubois-Briand , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH v2 1/3] mesa: Upgrade to 26.1.5 Date: Sun, 19 Jul 2026 10:01:06 +0200 Message-ID: <20260719080108.1290998-1-zboszor@gmail.com> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 19 Jul 2026 08:01:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241276 See the announcement: https://lists.freedesktop.org/archives/mesa-dev/2026-July/226671.html Signed-off-by: Zoltán Böszörményi --- meta/recipes-graphics/mesa/mesa.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index bb071e2411..15d56c804d 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -23,8 +23,8 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-src-util-u_math.c-do-not-use-arm-fpu-instructions-if.patch \ " -SRC_URI[sha256sum] = "072705caa9adf4740f1489194b13e278ad959166863b5271fe423a86353c9ab6" -PV = "26.1.4" +SRC_URI[sha256sum] = "79e421c7ce18cd9e790b8375920325779f10798630bf30e0b22f1a21c8617122" +PV = "26.1.5" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" From patchwork Sun Jul 19 08:01:07 2026 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: 92812 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 800EBC44512 for ; Sun, 19 Jul 2026 08:01:29 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.1672.1784448082496068023 for ; Sun, 19 Jul 2026 01:01:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=WHEwBv6f; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: zboszor@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4955adb04e8so1210595e9.2 for ; Sun, 19 Jul 2026 01:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784448081; x=1785052881; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=XoN82jvJuX7gUFjD3vOUauWChaPUxZCiUlqWYDVL7kY=; b=WHEwBv6fZB5iU8gVInQ6ZyX7/ot+MJctoGcNIvZQlSmsU8dSGvUTOcrHnGrMPPRNyl zQlEMOU9uZrLhQMHw5r9vSs/EL5BDYktz8GSWtIXsqCUz9uGGMCWKEkyI6eNuf82nx4d S+xABcg+bpqQhBwsg8NQHg6NlmOGgquPLLOQya9iFtSsTJSAs7E3oV6zpa7Mn2SoxZI5 i+BknnQyJ080OKgH7X/Ac0IgnUgFM9YTeRnotEidNn0Pr8BwOV1gXgEhGYrSYUgimk2x MdhYC2feQJnxaS7Hz0LX6WHNYC7yN2SK4+Vb0cZYEEIar7EGp61L5OrHxQtRXAf6LPzB zrSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784448081; x=1785052881; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=XoN82jvJuX7gUFjD3vOUauWChaPUxZCiUlqWYDVL7kY=; b=WoywbYMspmObWBsMZ7YW31TZz8eCkUU0sfgzHZfVvqlO4aOwjVOZl1gQaE4A7QFB29 Jv7ahMTWQ8tq6XvQT4NpB4MDNJ2rThu7xVjWYBePtPIqEGegLYnylt/wtT1dc73xlhwm u7IgGsUwCY4/vElUgRrxZTUCEki0I8TTaowfucgwbU73s7cl/rN5QeBjsU7p74/wQyMr Z8US1SgLLwTqreMghov2r/mc3aMpIFEeN8fuYulfv4FFAIc3zQ9IjSf/bXv9RtBQxsZ6 1HnyWrjQCX3i8KJjmvpOSPWVdCXh7MVoVETy2uPn7HTifcOl3WkQzTEIXpdJ2N4x5Li/ fMqQ== X-Gm-Message-State: AOJu0YzXAptYT/tNLoqLqnE9v51qdGGuznNr1zeDir7QvE12UVSRT7lD rUv7V6oMYBWZlWLccRpbzq6u5Lscc+iNdEtygV+pbtkMMdD1TAV1Wu81gwr8Sw== X-Gm-Gg: AfdE7ck2s4La3TfDk9Y4S/eXjOJS1sQ6quXrRvGK8JsI7uhAO5QetUdkp/difEwLX5T 36BOZIXkhjkHTv3KdNxXCJEky3bvdV/zbJTYAQT6qn/usaMUnEtluo00K/+KXOj3+xG9l5T/Rln T6tvOGp0SMz6YHDEx61y0AMW/q9VNHvnKeR9++iKCG0RJfGULBFgJn/aMjCapbdI49Dl2zyGqKi duvUDHerZGBpS391/RZ1eHC6HCDJZrNC4/nhwmzGgoQLMN3c5qBNqzYDIyC70sU2mf+YxJjSMIV C+TjKL6sPo3cCjPboz9U0JTWYTzIA4rqIKiGNOFePv5iUS3gzSynWmNaes982pQHr3xjFjzBIlE TrHdThIYy4iLUQUWbvzLsbjiMqYyThV009v4IgzposKY30kALlbRoneUqJb9+WliT7Nc= X-Received: by 2002:a05:600c:5351:b0:493:c8a6:b517 with SMTP id 5b1f17b1804b1-4954a51bb65mr70866525e9.38.1784448080617; Sun, 19 Jul 2026 01:01:20 -0700 (PDT) Received: from term011.lan (BC24447B.dsl.pool.telekom.hu. [188.36.68.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e49500sm19221644f8f.2.2026.07.19.01.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2026 01:01:20 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Mathieu Dubois-Briand , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH v2 2/3] mesa-libclc: New recipe for forking libclc for Rusticl purposes in Mesa Date: Sun, 19 Jul 2026 10:01:07 +0200 Message-ID: <20260719080108.1290998-2-zboszor@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260719080108.1290998-1-zboszor@gmail.com> References: <20260719080108.1290998-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 19 Jul 2026 08:01:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241277 See the reasoning and discussion at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020 TL;DR: LLVM constantly introduces breaking changes that cause regressions for running OpenCL CTS with Rusticl and finally Karol Herbst had enough. This fork is from the LLVM 22 version of libclc and contains the necessary fixes to make Rusticl pass OpenCL CTS. Signed-off-by: Zoltán Böszörményi --- meta/conf/distro/include/maintainers.inc | 1 + meta/recipes-graphics/mesa/mesa-libclc_git.bb | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-graphics/mesa/mesa-libclc_git.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 4c6307086c..927318e7f1 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -523,6 +523,7 @@ RECIPE_MAINTAINER:pn-menu-cache = "Ross Burton " RECIPE_MAINTAINER:pn-mesa = "Unassigned " RECIPE_MAINTAINER:pn-mesa-demos = "Unassigned " RECIPE_MAINTAINER:pn-mesa-gl = "Unassigned " +RECIPE_MAINTAINER:pn-mesa-libclc = "Zoltán Böszörményi " RECIPE_MAINTAINER:pn-mesa-tools-native = "Unassigned " RECIPE_MAINTAINER:pn-meson = "Trevor Gamblin " RECIPE_MAINTAINER:pn-meta-environment-${MACHINE} = "Richard Purdie " diff --git a/meta/recipes-graphics/mesa/mesa-libclc_git.bb b/meta/recipes-graphics/mesa/mesa-libclc_git.bb new file mode 100644 index 0000000000..8a3a78d051 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-libclc_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "Mesa fork of libclc: Implementation of the library requirements of the OpenCL C programming language." +HOMEPAGE = "https://gitlab.freedesktop.org/karolherbst/mesa-libclc/" +SECTION = "devel" +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=7cc795f6cbb2d801d84336b83c8017db" + +SRC_URI = "git://gitlab.freedesktop.org/karolherbst/mesa-libclc.git;protocol=https;branch=llvm_22" + +SRCREV = "b1934c37694714352edc19232e23480feaf18ab4" +PV = "0.1.0" + +inherit cmake pkgconfig + +# Depend explicitly on clang-native instead of using TOOLCHAIN as the build +# objects from this recipe are build explicitly using clang for GPU targets. +# We could INHIBIT_DEFAULT_DEPS to avoid any other toolchain but then we need +# to wrestle CMake to configure without a toolchain. +DEPENDS += "clang-native spirv-llvm-translator-native" + +# Semicolon-separated list of targets to build +LIBCLC_TARGETS ?= "all" + +EXTRA_OECMAKE += "-DLIBCLC_TARGETS_TO_BUILD='${LIBCLC_TARGETS}'" + +FILES:${PN} += "${datadir}/mesa-clc" + +BBCLASSEXTEND = "native nativesdk" From patchwork Sun Jul 19 08:01:08 2026 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: 92811 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 6F3D6C44520 for ; Sun, 19 Jul 2026 08:01:29 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.1655.1784448083740094652 for ; Sun, 19 Jul 2026 01:01:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=CHiCRZGs; spf=pass (domain: gmail.com, ip: 209.85.128.41, mailfrom: zboszor@gmail.com) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4954df200ddso8233865e9.0 for ; Sun, 19 Jul 2026 01:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784448082; x=1785052882; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=mUuu93/bRI7Fe9J5bkvuzVIFqZX2tQIn6bayVJyFVEs=; b=CHiCRZGsYLQqql54QwyaifdxJ4WQhHwd6HA1tEGnUJSBGihFBzuOZaZ9+CZSCEbCRj nEGVCMtvT7J/ALT7tBQOcPFA1/aXrZNxQz25hLsXjHETe/PBFzf8IzcvGGcvpoZAYE+3 c7jNZAsPJQJqUpvMf3Uv6ktcFeCt0hn8NnPWm+rpGb0a3wzJRy871MkLwePTVEGALELF 1ErXwvGh9cbdo7W4jNepgn2hLHVaAKTRNt7asPD7Lx4opYRFhmaD0lwdOvkzdwl4Ty6p kqjY/cjxlwUPonJzGl9DKx1k1Ispf0Dz6j6CanZxaCEa9nsbDF5zfqGKH3GRbe6teHQi yU1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784448082; x=1785052882; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=mUuu93/bRI7Fe9J5bkvuzVIFqZX2tQIn6bayVJyFVEs=; b=IaCMIHZiBKXOEToCKIC5cXBjGdOLtw8v+bPoc6cOYlcCHArjkt09cJJJE3uSHY/+qS ZXy0vvOnPw+J2J3WYRy4qzJ8UmQsX0Ox0pz60VuEgLFcwLC8h3KLc0bTnpOGfX3YUtIq 4ldkFhx4vEHo+kgyycVBE8rmYLp56E4gZRGYulIj7RYlOO3JJGayDhlkkGhNpNcvBXrx z209+JtOzWFJ4DWNoWyjQTS40rPKsW2RW0p6D7r8XK01qlx1kXkVhhPPPWyInjwP0kPM DIukkYwNl3dpfdKrS+kd09NOpCzlo8Vf+dBa+r/weIqbxLEnANYSZPw+u7qFE8RXyYxd vUHA== X-Gm-Message-State: AOJu0YxZQCRxqdw9zXUU4X1p3FLjG9lnYibHipu+Aeg4jN460rVFo9WL cZfFLb9z1acszo2vf4X3ostWmeUBu47M5NeCcZGJicket82wm0g4mzdpaJ313Q== X-Gm-Gg: AfdE7cm4AGYqZCNAdZAkgM490QOiG1vgbYlubbyUzFJU4eQiazphcoYTCmjizsasJ7k 0Uy/5o1q3/hN9Zx/tv99RxC5/xVfFxZEJIiBe0Mi1jlryHrLWB4gAYV0TM5WS/S+Wz0HdMTf6Tv IjdvUBK6ZBgzi5V3kt28jY+uQrmfH3PqJvkPME1VntEKzhxzOYDPM/A7h9zn7jaOSLoRG4idYja Cswirm9n8dSjqC8OIlDzpMKY9/FhNri/wXy2IZ7rSADw8RXRgIHVRkzHy821NJtObNr5SQEd1/n ixYQDOide6YAbdDuhRI9WgIgq6/TcjJgfMOrGoOhH1ouAZXjPeY84Y9ifumxl2jDD0CZXFbdd5U BnhNIjy4IQoY9fsOLsy0kxadzjci0QQy+0zrgXREyVS3/si6vOT6D7YIRWXf02ZsGFOGL6rEPlV VXSi+unEY8AspS X-Received: by 2002:a05:600c:3586:b0:495:3f68:699b with SMTP id 5b1f17b1804b1-4954a3f3173mr98045265e9.9.1784448081505; Sun, 19 Jul 2026 01:01:21 -0700 (PDT) Received: from term011.lan (BC24447B.dsl.pool.telekom.hu. [188.36.68.123]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e49500sm19221644f8f.2.2026.07.19.01.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2026 01:01:21 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Mathieu Dubois-Briand , =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= Subject: [PATCH v2 3/3] mesa, mesa-tools-native: Use mesa-libclc Date: Sun, 19 Jul 2026 10:01:08 +0200 Message-ID: <20260719080108.1290998-3-zboszor@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260719080108.1290998-1-zboszor@gmail.com> References: <20260719080108.1290998-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 19 Jul 2026 08:01:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241278 Backport two patches from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020 to use mesa-libclc, which makes Rusticl's OpenCL C more correct. Signed-off-by: Zoltán Böszörményi --- ...-optional-for-configs-not-needing-it.patch | 123 ++++++++++++++++++ ...lc-use-our-downstream-fork-of-libclc.patch | 43 ++++++ .../mesa/mesa-tools-native.bb | 2 +- meta/recipes-graphics/mesa/mesa.inc | 6 +- 4 files changed, 171 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-graphics/mesa/files/0001-clc-make-libclc-optional-for-configs-not-needing-it.patch create mode 100644 meta/recipes-graphics/mesa/files/0002-clc-use-our-downstream-fork-of-libclc.patch diff --git a/meta/recipes-graphics/mesa/files/0001-clc-make-libclc-optional-for-configs-not-needing-it.patch b/meta/recipes-graphics/mesa/files/0001-clc-make-libclc-optional-for-configs-not-needing-it.patch new file mode 100644 index 0000000000..a52931dbf5 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-clc-make-libclc-optional-for-configs-not-needing-it.patch @@ -0,0 +1,123 @@ +From 5df2fb59c32fd6e3ad53bdaf98afccfddbdd14fc Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Fri, 17 Jul 2026 17:45:45 +0200 +Subject: [PATCH 1/2] clc: make libclc optional for configs not needing it + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020] +--- + meson.build | 2 +- + src/compiler/clc/meson.build | 73 +++++++++++++++++++----------------- + 2 files changed, 39 insertions(+), 36 deletions(-) + +diff --git a/meson.build b/meson.build +index 1eca91fc940..68bbb942b99 100644 +--- a/meson.build ++++ b/meson.build +@@ -949,7 +949,7 @@ with_poly = [ + ].contains(true) + + dep_clc = null_dep +-if with_clc ++if with_gallium_rusticl or with_microsoft_clc + dep_clc = dependency('libclc') + endif + +diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build +index 9ff61440f0d..249fd31f478 100644 +--- a/src/compiler/clc/meson.build ++++ b/src/compiler/clc/meson.build +@@ -4,7 +4,6 @@ + files_libmesaclc = files( + 'clc.c', + 'clc_helpers.cpp', +- 'nir_load_libclc.c', + ) + + _libmesaclc_c_args = [] +@@ -41,45 +40,49 @@ if not _shared_llvm or \ + _libmesaclc_cpp_args += ['-DUSE_STATIC_OPENCL_C_H=1'] + endif + +-_basedir = dep_clc.get_variable(pkgconfig : 'libexecdir') ++if dep_clc.found() ++ files_libmesaclc += 'nir_load_libclc.c' + +-_static_libclc = get_option('static-libclc') +-if _static_libclc.length() > 0 +- if _static_libclc.contains('all') +- _static_libclc = ['spirv', 'spirv64'] +- endif +- prog_zstd = find_program('zstd', required : false, native : true) +- _zstd_static_libclc = dep_zstd.found() and prog_zstd.found() +- if _zstd_static_libclc +- _libmesaclc_c_args += '-DHAVE_STATIC_LIBCLC_ZSTD' +- endif +- foreach s : _static_libclc +- _libmesaclc_c_args += '-DHAVE_STATIC_LIBCLC_@0@'.format(s.to_upper()) +- f = '@0@-mesa3d-.spv'.format(s) +- _libclc_file = _basedir / f ++ _basedir = dep_clc.get_variable(pkgconfig : 'libexecdir') ++ ++ _static_libclc = get_option('static-libclc') ++ if _static_libclc.length() > 0 ++ if _static_libclc.contains('all') ++ _static_libclc = ['spirv', 'spirv64'] ++ endif ++ prog_zstd = find_program('zstd', required : false, native : true) ++ _zstd_static_libclc = dep_zstd.found() and prog_zstd.found() + if _zstd_static_libclc +- _libclc_file = custom_target( +- '@0@.zstd'.format(f), +- command : [prog_zstd, '-f', '@INPUT@', '-o', '@OUTPUT@'], ++ _libmesaclc_c_args += '-DHAVE_STATIC_LIBCLC_ZSTD' ++ endif ++ foreach s : _static_libclc ++ _libmesaclc_c_args += '-DHAVE_STATIC_LIBCLC_@0@'.format(s.to_upper()) ++ f = '@0@-mesa3d-.spv'.format(s) ++ _libclc_file = _basedir / f ++ if _zstd_static_libclc ++ _libclc_file = custom_target( ++ '@0@.zstd'.format(f), ++ command : [prog_zstd, '-f', '@INPUT@', '-o', '@OUTPUT@'], ++ input : [_libclc_file], ++ output : '@0@.zstd'.format(f), ++ ) ++ endif ++ files_libmesaclc += custom_target( ++ '@0@.h'.format(f), ++ command : [ ++ prog_python, files_xxd, '-b', '@INPUT@', '@OUTPUT@', ++ '-n', 'libclc_@0@_mesa3d_spv'.format(s), ++ ], + input : [_libclc_file], +- output : '@0@.zstd'.format(f), ++ output : '@0@.h'.format(f), ++ depend_files : files_xxd, + ) ++ endforeach ++ else ++ _libmesaclc_c_args += ['-DDYNAMIC_LIBCLC_PATH="@0@/"'.format(_basedir)] ++ if not cc.has_function('mmap') ++ error('mmap required for dynamic libCLC loading') + endif +- files_libmesaclc += custom_target( +- '@0@.h'.format(f), +- command : [ +- prog_python, files_xxd, '-b', '@INPUT@', '@OUTPUT@', +- '-n', 'libclc_@0@_mesa3d_spv'.format(s), +- ], +- input : [_libclc_file], +- output : '@0@.h'.format(f), +- depend_files : files_xxd, +- ) +- endforeach +-else +- _libmesaclc_c_args += ['-DDYNAMIC_LIBCLC_PATH="@0@/"'.format(_basedir)] +- if not cc.has_function('mmap') +- error('mmap required for dynamic libCLC loading') + endif + endif + +-- +2.55.0 + diff --git a/meta/recipes-graphics/mesa/files/0002-clc-use-our-downstream-fork-of-libclc.patch b/meta/recipes-graphics/mesa/files/0002-clc-use-our-downstream-fork-of-libclc.patch new file mode 100644 index 0000000000..39e120b036 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0002-clc-use-our-downstream-fork-of-libclc.patch @@ -0,0 +1,43 @@ +From 8bda7974958e5ba56b0eec25a7876c004b6b743b Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Thu, 16 Jul 2026 21:20:52 +0200 +Subject: [PATCH 2/2] clc: use our downstream fork of libclc + +There are a couple of issues with the upstream versions and release +schedules and overall experience makes it dificult for us to rely on +users using a proper functional implementation. + +And we want to ship a conformant OpenCL implementation here and that's +difficult if users run untested libclc versions or libclc with known bugs +that aren't going to get fixed upstream because the release is already +EoL. + +Backport-to: * +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43020] +--- + meson.build | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 68bbb942b99..6e2590cc2c6 100644 +--- a/meson.build ++++ b/meson.build +@@ -950,7 +950,14 @@ with_poly = [ + + dep_clc = null_dep + if with_gallium_rusticl or with_microsoft_clc +- dep_clc = dependency('libclc') ++ dep_clc = dependency('mesa-libclc', required : false, ++ not_found_message : ++ 'mesa-libclc not found. Build will fall back to upstream libclc, however ' + ++ 'certain versions are known to contain bugs that make OpenCL builtins ' + ++ 'return incorrect results.') ++ if not dep_clc.found() ++ dep_clc = dependency('libclc') ++ endif + endif + + gl_pkgconfig_c_flags = [] +-- +2.55.0 + diff --git a/meta/recipes-graphics/mesa/mesa-tools-native.bb b/meta/recipes-graphics/mesa/mesa-tools-native.bb index 20207450bf..c495d2e8a8 100644 --- a/meta/recipes-graphics/mesa/mesa-tools-native.bb +++ b/meta/recipes-graphics/mesa/mesa-tools-native.bb @@ -11,7 +11,7 @@ PACKAGECONFIG += "gallium-llvm" # to PACKAGECONFIG like in mesa.inc PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}" -DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native" +DEPENDS += "mesa-libclc-native spirv-tools-native spirv-llvm-translator-native" EXTRA_OEMESON += " \ -Dmesa-clc=enabled -Dinstall-mesa-clc=true -Dmesa-clc-bundle-headers=enabled \ diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 15d56c804d..dea7a8295f 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -21,6 +21,8 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch \ file://0001-src-intel-compiler-jay-fix-GCC-10-case-label-declara.patch \ file://0001-src-util-u_math.c-do-not-use-arm-fpu-instructions-if.patch \ + file://0001-clc-make-libclc-optional-for-configs-not-needing-it.patch \ + file://0002-clc-use-our-downstream-fork-of-libclc.patch \ " SRC_URI[sha256sum] = "79e421c7ce18cd9e790b8375920325779f10798630bf30e0b22f1a21c8617122" @@ -110,7 +112,7 @@ PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" # "opencl" also requires libclc and gallium-llvm to be present in PACKAGECONFIG! # Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang libclc spirv-tools spirv-llvm-translator" +PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang mesa-libclc spirv-tools spirv-llvm-translator" X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence" # "x11" requires "opengl" @@ -254,7 +256,7 @@ RPROVIDES:libopencl-mesa += "virtual-opencl-icd" RPROVIDES:libgles2-mesa += "libgles3-mesa" RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev" -RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc', '', d)}" +RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-libclc', '', d)}" PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libgallium \