From patchwork Wed Feb 28 17:31:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dan X-Patchwork-Id: 61226 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 D3C9627BBEA; Wed, 28 Feb 2024 17:33:56 +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 EB2E927BBE2 for ; Wed, 28 Feb 2024 17:33:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfNoO-0005qD-WC; Wed, 28 Feb 2024 12:33:45 -0500 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 1rfNoK-0005k7-Ej for guix-patches@gnu.org; Wed, 28 Feb 2024 12:33:40 -0500 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 1rfNoI-0002GR-GV for guix-patches@gnu.org; Wed, 28 Feb 2024 12:33:40 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfNoj-0007JE-3H for guix-patches@gnu.org; Wed, 28 Feb 2024 12:34:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69461] [mesa-updates 13/13] gnu: Add directx-shader-compiler. Resent-From: dan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Feb 2024 17:34:05 +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: To: 69461@debbugs.gnu.org Received: via spool by 69461-submit@debbugs.gnu.org id=B69461.170914160927952 (code B ref 69461); Wed, 28 Feb 2024 17:34:05 +0000 Received: (at 69461) by debbugs.gnu.org; 28 Feb 2024 17:33:29 +0000 Received: from localhost ([127.0.0.1]:56388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfNo5-0007Ga-1M for submit@debbugs.gnu.org; Wed, 28 Feb 2024 12:33:29 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:41107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfNnt-0007F9-0s for 69461@debbugs.gnu.org; Wed, 28 Feb 2024 12:33:13 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id AC4D63200AC4 for <69461@debbugs.gnu.org>; Wed, 28 Feb 2024 12:32:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 28 Feb 2024 12:32:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dan.games; h=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=fm2; t=1709141560; x= 1709227960; bh=UyIPEDIJLKlFNLTEhZG6+8vjlKn8nfYWXAh99nap28s=; b=J MhjzFtDfEU4UlpULUtw7EXUUdUv8gAOEcAw2Z4dyGJ3jmDG3WVHuFwGITXggW43j GFbWrMyctruZmQZBzu7BCpOD3iiVuIdIjbY7w1njOavfwiXnG6wN+1KgT0vJEE6M 4gveWoHbpFums9fuQ6rS574cTxs5yFwgEO1h8OOdoQRia+KTWTXZn4z9mi8Cvn0s OPU/7+cVcYmTCc5hryGccWyjTHyFaM5DtMd7tiYK3YJrhv0QLxe4laMoPCB84o3T 5Tn45n1h882oyPBGDK2HnMBOvix46qpjnZ1kEdggCObSg0jppjKIP3Dam/TAH0WY AEPeHBSuUD00a4cTkIAhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; t=1709141560; x=1709227960; bh=UyIPEDIJLKlFN LTEhZG6+8vjlKn8nfYWXAh99nap28s=; b=HI6WupxWzGT3YhH7YS28aXKGg78Ra fijoQfY4RfflxCr0YbWqtV+OpCHR83EsTUCaLQ08NiQ3P0+Zj84bmVqZE7BW/g31 V26nuE8FIocIKC33QQUpxfXwqfPGaJ5aGNsqho9FZ0EqEACmDutwcqMfPt3zboOR PtDuU6FG/PRPKkQxLiryUoh5aQXZ2mgeKH4B3BV8JBvPNGSKaRgQ5WsKk2/srXB8 cCqLF0fUcuATn69cpoxwbiFem0reMPx4AONXU8FJofVaUfSUHCZ2rZ+BDNYEZTnV doGCL7uyNSqxu1VfvvFwtqXfVoVye+aqff8+/m5Z0QQ61PRNOmQ8JND1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgeejgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpegurghnuceoihesuggrnhdrghgrmhgvsheqnecuggftrfgrthht vghrnhephfejvdefkeekhfehieevueeufedtjeevjeelueetleduleegtdeuteefhfduue dvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehisegurghnrdhgrghmvghs X-ME-Proxy: Feedback-ID: i3b5946ed:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <69461@debbugs.gnu.org>; Wed, 28 Feb 2024 12:32:38 -0500 (EST) From: dan Date: Thu, 29 Feb 2024 01:31:46 +0800 Message-ID: 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-headers-for-dxc): New variable. * gnu/packages/vulkan.scm (directx-shader-compiler): New variable. Change-Id: I6e81f59ebd7122c007cce2df820359c055df5fd9 --- gnu/packages/vulkan.scm | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 599b0a47d3..2597f6d701 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 %vulkan-sdk-version "vulkan-sdk-1.3.275.0") @@ -582,3 +584,73 @@ (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.git") + (commit commit))) + (file-name (git-file-name "directx-headers-for-dxc" + (git-version "0" revision commit))) + (sha256 (base32 "0c7l2xdsbr132ga2nyqjhz9xa42dxvhh9idjxnl673mz5kab1j6h"))))) + +(define-public directx-shader-compiler + ;; This commit drops the dependency on effcee. + (let ((commit "5f7834de562eeda3689fba0824008e1bcd7958b8") + (revision "0")) + (package + (name "directx-shader-compiler") + (version "1.7.2308") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/microsoft/DirectXShaderCompiler.git") + (commit commit))) + (file-name (git-file-name "directx-shader-compiler" + (git-version version revision commit))) + (sha256 + (base32 "0awnn5qb9hci3pprl6p84y4hlh6xibgsv0vwp6sm6n7wn71z2cb9")) + (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)))) +