[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#69461] [PATCH mesa-updates v3 13/13] gnu: Add directx-shader-compil
From: |
dan |
Subject: |
[bug#69461] [PATCH mesa-updates v3 13/13] gnu: Add directx-shader-compiler. |
Date: |
Thu, 28 Mar 2024 11:54:55 +0800 |
* 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)))
--
2.41.0
- [bug#69461] [PATCH mesa-updates v3 03/13] gnu: glslang: Update to 1.3.280.0., (continued)
- [bug#69461] [PATCH mesa-updates v3 03/13] gnu: glslang: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 06/13] gnu: vulkan-headers: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 04/13] gnu: spirv-cross: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 05/13] gnu: shaderc: Update to 2024.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 11/13] gnu: Add vulkan-utility-libraries., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 08/13] gnu: volk: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 09/13] gnu: vulkan-tools: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 07/13] gnu: vulkan-loader: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 12/13] gnu: vulkan-validationlayers: Update to 1.3.280.0., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 10/13] gnu: magic-enum: Update to 0.9.5., dan, 2024/03/27
- [bug#69461] [PATCH mesa-updates v3 13/13] gnu: Add directx-shader-compiler.,
dan <=