From patchwork Thu Mar 28 03:54:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dan X-Patchwork-Id: 62322 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 7194027BBEA; Thu, 28 Mar 2024 03:58:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 854CE27BBE2 for ; Thu, 28 Mar 2024 03:58:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpgt6-000186-M0; Wed, 27 Mar 2024 23:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpgt3-00014G-Gs for guix-patches@gnu.org; Wed, 27 Mar 2024 23:57:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpgt3-0008Bm-7R for guix-patches@gnu.org; Wed, 27 Mar 2024 23:57:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpgt3-0001I1-MZ for guix-patches@gnu.org; Wed, 27 Mar 2024 23:57:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69461] [PATCH mesa-updates v3 13/13] gnu: Add directx-shader-compiler. Resent-From: dan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Mar 2024 03:57:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69461 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69461@debbugs.gnu.org Cc: john.kehayias@protonmail.com Received: via spool by 69461-submit@debbugs.gnu.org id=B69461.17115981984724 (code B ref 69461); Thu, 28 Mar 2024 03:57:09 +0000 Received: (at 69461) by debbugs.gnu.org; 28 Mar 2024 03:56:38 +0000 Received: from localhost ([127.0.0.1]:38722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpgsX-0001E3-OS for submit@debbugs.gnu.org; Wed, 27 Mar 2024 23:56:38 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:54115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpgsQ-0001CZ-Ao for 69461@debbugs.gnu.org; Wed, 27 Mar 2024 23:56:30 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 186DE3200A12; Wed, 27 Mar 2024 23:56:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 27 Mar 2024 23:56:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dan.games; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1711598183; x= 1711684583; bh=xZePi0aMmsnR+c2thG2i40BlLLcfURrzWMoJ/9O8rms=; b=I ZbvFdYVZMP+XRlAaWbBmq53ewPi16AzCss+2kJJ3IZ0m7BsVgwcoCMfxP7tAtLcS E8KJOrPJCmNoEuPdR7qDTRWoLZgfHD2kAK2jNoZPMx7wK0ctYJjPJ6ie/4xs6jT0 tRpUkHGc7YLfnuc/Wz89T6YdYILzrcddCEWniuC9Nh38A+iDQTljZWY9O48NVo0x x7tJBFjHuuop0Xwmbg7RAITUE2OmlvxDXtKhSKuUB2JYLdc0P1qEwRvVNXLIgfjk jtC4aopB4llSR7xSjTisNpY4LXPPvXAFXmmhVWO+g/4Lqqw0Py9LEzhBSNmP/V6G /3MEfsHcynp1avVyP3QGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711598183; x= 1711684583; bh=xZePi0aMmsnR+c2thG2i40BlLLcfURrzWMoJ/9O8rms=; b=u STFZoxyqfahnhXh+nfIpYaUE4WE0ABn4J+wWD1dSrqteqSqZQQ9xTTkwqCG8yAqr cm3XqQeaGb7gMPJ6ga7uhPDMuzliNY7/mrLrr7rkNafVK5mV6uQsI8FRo+CoHpLY wz+EJjoVF6JPB7Nt3xG7iibbkG/LQOu1nnXUIQXSHygv0SrZSzFHckG5Bo8tmF/9 RuiY3R7OieH+vpyWJoTCF+cuRO44Axr3oWXXKztOBdQp33Sy5Hy35Oinf8yw1Rj7 v2L7CF5d9F7Md7LnkzaniFs6h1M7BDMD5vOWoUF7B6CDzdO3u/pQDyS2MsS7XT+D hRrVfbkF6vUDLko/ofutg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddukedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpegurghnuceoihesuggrnhdrghgrmhgvsheqnecuggftrfgr thhtvghrnhepvdekvdelueffhfeffeffueduieehgfdvjedvtddvkeehvdffgeevgffgff fhgeejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigv pedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehisegurghnrdhgrghmvghs X-ME-Proxy: Feedback-ID: i3b5946ed:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 27 Mar 2024 23:56:22 -0400 (EDT) From: dan Date: Thu, 28 Mar 2024 11:54:55 +0800 Message-ID: <85c049f7241ecdb209022a8a473b5fc0baa6643d.1711561863.git.i@dan.games> X-Mailer: git-send-email 2.41.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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vulkan.scm (directx-shader-compiler): New variable. Change-Id: I3d7ae6da3f6d6394d559c3cc2676be4d477e6b1e --- gnu/packages/vulkan.scm | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 1016e9db36..35f2339e43 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -44,7 +44,9 @@ (define-module (gnu packages vulkan) #:use-module (gnu packages llvm) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages version-control) #:use-module (gnu packages wine) + #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) (define-public spirv-headers @@ -615,3 +617,68 @@ (define-public vulkan-utility-libraries (synopsis "Utility libraries for Vulkan developers") (description "Utility libraries for Vulkan developers.") (license license:asl2.0))) + +;; directx-shader-compiler depends on an old version of directx-headers. +(define directx-headers-for-dxc + (let ((commit "980971e835876dc0cde415e8f9bc646e64667bf7") + (revision "115")) + (origin + (method git-fetch) + (uri (git-reference (url + "https://github.com/microsoft/DirectX-Headers") + (commit commit))) + (file-name (git-file-name "directx-headers-for-dxc" + (git-version "0" revision commit))) + (sha256 (base32 "0c7l2xdsbr132ga2nyqjhz9xa42dxvhh9idjxnl673mz5kab1j6h"))))) + +(define-public directx-shader-compiler + (package + (name "directx-shader-compiler") + (version "1.8.2403.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/microsoft/DirectXShaderCompiler") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14nd4ys0x14z17l5fkaysc9a1gfw3fmdj8gvxw1a013yg6fla7g3")) + (modules '((guix build utils))) + (snippet '(substitute* "CMakeLists.txt" + (("add_subdirectory\\(external\\)") + "find_package(SPIRV-Tools REQUIRED) +find_package(SPIRV-Tools-opt CONFIG REQUIRED)"))))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags #~(list "-G" + "Unix Makefiles" + "-C" + "../source/cmake/caches/PredefinedParams.cmake" + (string-append "-DSPIRV_HEADER_INCLUDE_DIR=" + #$(this-package-input + "spirv-headers") "/include") + (string-append "-DSPIRV_TOOLS_INCLUDE_DIR=" + #$(this-package-input + "spirv-tools") "/include") + (string-append "-DDIRECTX_HEADER_INCLUDE_DIR=" + #$directx-headers-for-dxc + "/include")) + #:phases #~(modify-phases %standard-phases + (replace 'install + (lambda* (#:key make-flags outputs #:allow-other-keys) + (apply invoke "make" "install-distribution" + make-flags)))))) + (inputs (list libxml2 spirv-headers spirv-tools)) + (native-inputs (list git python)) + (home-page "https://github.com/microsoft/DirectXShaderCompiler") + (synopsis + "Compiler and related tools used to compile High-Level Shader Language (HLSL)") + (description + "The DirectX Shader Compiler project includes a compiler and related +tools used to compile High-Level Shader Language (HLSL) programs into DirectX +Intermediate Language (DXIL) representation. Applications that make use of +DirectX for graphics, games, and computation can use it to generate shader +programs.") + (license license:ncsa)))