From patchwork Tue Aug 17 10:19:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 32156 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BEAB427BC78; Tue, 17 Aug 2021 11:29:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 66DD727BC6B for ; Tue, 17 Aug 2021 11:29:09 +0100 (BST) Received: from localhost ([::1]:34386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFwLE-0006TM-FZ for patchwork@mira.cbaines.net; Tue, 17 Aug 2021 06:29:08 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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"