From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QB/iBHOPG2G1JAAAgWs5BA (envelope-from ) for ; Tue, 17 Aug 2021 12:29:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0DueAHOPG2FNbAAAB5/wlQ (envelope-from ) for ; Tue, 17 Aug 2021 10:29:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C20241F1D8 for ; Tue, 17 Aug 2021 12:29:06 +0200 (CEST) Received: from localhost ([::1]:34386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFwLB-0006TM-Tx for larch@yhetil.org; Tue, 17 Aug 2021 06:29:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFwL8-0006T6-8N for guix-patches@gnu.org; Tue, 17 Aug 2021 06:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFwL8-0001I1-1d for guix-patches@gnu.org; Tue, 17 Aug 2021 06:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFwL7-0004OM-V6 for guix-patches@gnu.org; Tue, 17 Aug 2021 06:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50091] [PATCH 13/21] gnu: mesa: Add support for riscv64-linux. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 17 Aug 2021 10:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50091 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50091@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 50091-submit@debbugs.gnu.org id=B50091.162919609716815 (code B ref 50091); Tue, 17 Aug 2021 10:29:01 +0000 Received: (at 50091) by debbugs.gnu.org; 17 Aug 2021 10:28:17 +0000 Received: from localhost ([127.0.0.1]:51829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFwKL-0004N5-7N for submit@debbugs.gnu.org; Tue, 17 Aug 2021 06:28:17 -0400 Received: from flashner.co.il ([178.62.234.194]:45960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFwKJ-0004Mr-62 for 50091@debbugs.gnu.org; Tue, 17 Aug 2021 06:28:11 -0400 Received: from localhost (unknown [141.226.169.107]) by flashner.co.il (Postfix) with ESMTPSA id 7311A402E0; Tue, 17 Aug 2021 10:28:05 +0000 (UTC) From: Efraim Flashner Date: Tue, 17 Aug 2021 13:19:11 +0300 Message-Id: <68a51164197e64deafddd51a5cc5f1f4f31096f0.1629193993.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629196146; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=49pI6mz2NP+MQRxQuW8TT+0R27illpdMSreNl+jO5yo=; b=QpmIbOTrnW9k7yfWz1rt+/ReKSatyVD48o5+yNdUfF5uTXd5brpnrdoHV0xrjB2MO79jLg RXRqHe2C1Qu/WPXHCblFSBX9AKcxIHSd6Sh2j9tsfqtzoii6/WvQ5mjmASzG/8VeZ2fLdp btOE+IS/cTIf0vsULUjUwo7+DB4Zy78ZgWG8HcGo8CJP9643sHAih0LlXGglfo6BekL3QU LJd6pYTNwSe0Bs6xwOBmEbhRDyWZOoRHjzgx+cWcP8/BQND23b3OlFSoNYxKAkXwshxtcz TvkfY0Apxn0x1tPxxlZQFjFCqNyrXjFzlxx+9rSi0RfDf4l09AXTFKfCjm5ZsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629196146; a=rsa-sha256; cv=none; b=g8AYWiwjUo2QvOUBGc2LnQzlqWPOCoIDniBm4A3nm7ssMw1sgAB4nN2iQcucq6dcLFigmj gQa3NVa+w6jWFssbL93ju0b2MDE8HacZuzXIVBdoU1bEoLurDLtayXqILHxn1mtxEN5cQ8 wH0RPQva+tXZHlthPpwRvPQMAq2C4WDOqsw3HePNPC6Opp7sdAXn6iWmvItgT1X7D9B93u Bx0CARys/RioY18xFP7f8eedqdacJpefAXEMqAYvoIPsGcaWSjyMcPJtyX726xVoqbpAWz tNYrtUf3difpPAF9txYTbtdU21CiXVGy6566Kpd0MU48U5ULwSo3Icbe33Nc/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.58 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C20241F1D8 X-Spam-Score: 2.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: MksdHxji/xHt * gnu/packages/gl.scm (mesa)[inputs]: Add llvm-11 on riscv64-linux. [native-inputs]: Add glslang on riscv64-linux. [arguments]: In configure-flags adjust gallium-drivers to swap the power* and intel drivers for the fallback option. Specify riscv64-linux configure options for vulkan-drivers. Enable the vulkan-overlay-layer and llvm support. Adjust the custom 'disable-failing-test phase to have a riscv64-linux section. --- gnu/packages/gl.scm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 7a8a478953..8b82352204 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -274,7 +274,8 @@ also known as DXTn or DXTC) for Mesa.") ("libxrandr" ,libxrandr) ("libxvmc" ,libxvmc) ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux") + ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" + "powerpc-linux" "riscv64-linux") ;; Note: update the 'clang' input of mesa-opencl when bumping this. `(("llvm" ,llvm-11))) (_ @@ -286,7 +287,8 @@ also known as DXTn or DXTC) for Mesa.") ("flex" ,flex) ("gettext" ,gettext-minimal) ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux") + ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" + "powerpc-linux" "riscv64-linux") `(("glslang" ,glslang))) (_ `())) @@ -301,10 +303,10 @@ also known as DXTn or DXTC) for Mesa.") ((or "armhf-linux" "aarch64-linux") ;; TODO: Fix svga driver for non-Intel architectures. '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl")) - ((or "powerpc64le-linux" "powerpc-linux") - '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl")) + ((or "x86_64-linux" "i686-linux") + '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")) (_ - '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl"))) + '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))) ;; Enable various optional features. TODO: opencl requires libclc, ;; omx requires libomxil-bellagio "-Dplatforms=x11,wayland" @@ -327,12 +329,15 @@ also known as DXTn or DXTC) for Mesa.") '("-Dvulkan-drivers=amd,swrast")) ("aarch64-linux" '("-Dvulkan-drivers=freedreno,amd,broadcom,swrast")) + ("riscv64-linux" + '("-Dvulkan-drivers=amd,swrast")) (_ '("-Dvulkan-drivers=auto"))) ;; Enable the Vulkan overlay layer on architectures using llvm. ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux") + ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" + "powerpc-linux" "riscv64-linux") '("-Dvulkan-overlay-layer=true")) (_ '())) @@ -346,7 +351,7 @@ also known as DXTn or DXTC) for Mesa.") ((or "x86_64-linux" "i686-linux") '("-Ddri-drivers=i915,i965,nouveau,r200,r100" "-Dllvm=enabled")) ; default is x86/x86_64 only - ((or "powerpc64le-linux" "aarch64-linux" "powerpc-linux") + ((or "powerpc64le-linux" "aarch64-linux" "powerpc-linux" "riscv64-linux") '("-Ddri-drivers=nouveau,r200,r100" "-Dllvm=enabled")) (_ @@ -365,6 +370,13 @@ also known as DXTn or DXTC) for Mesa.") (add-after 'unpack 'disable-failing-test (lambda _ ,@(match (%current-system) + ("riscv64-linux" + ;; According to the test logs the llvm JIT is not designed + ;; for this architecture and the llvmpipe tests all segfault. + ;; The same is true for mesa:gallium / osmesa-render. + `((substitute* '("src/gallium/drivers/llvmpipe/meson.build" + "src/gallium/targets/osmesa/meson.build") + (("if with_tests") "if false")))) ("powerpc64le-linux" ;; Disable some of the llvmpipe tests. `((substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c" -- 2.32.0