diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/vulkan.scm | 103 |
1 files changed, 77 insertions, 26 deletions
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index f5c619a2b2..6840f66c68 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org> +;;; Copyright © 2022 Kaelyn Takata <kaelyn.alexi@protonmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,16 +46,16 @@ (define-public spirv-headers (package (name "spirv-headers") - (version "1.5.3") + (version "1.2.198.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/SPIRV-Headers") - (commit version))) + (commit (string-append "sdk-" version)))) (sha256 (base32 - "069sivqajp7z4p44lmrz23lvf237xpkjxd4lzrg27836pwqcz9bj")) + "0v6ycgfxh9d2gzhxrnxgrn5gyg2cshg55767qdg46px8412j5lbi")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments @@ -77,7 +78,7 @@ and for the GLSL.std.450 extended instruction set. (define-public spirv-tools (package (name "spirv-tools") - (version "2020.2") + (version "2021.4") (source (origin (method git-fetch) @@ -85,11 +86,14 @@ and for the GLSL.std.450 extended instruction set. (url "https://github.com/KhronosGroup/SPIRV-Tools") (commit (string-append "v" version)))) (sha256 - (base32 "00b7xgyrcb2qq63pp3cnw5q1xqx2d9rfn65lai6n6r89s1vh3vg6")) + (base32 "1f0kzgx8ishzxhzrcvcmpkmb3cigyya92p3bdabsgbjr6mkmcdj3")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" + ;; Some packages like mpv fail to link + ;; when the static libraries are built. + "-DSPIRV_TOOLS_BUILD_STATIC=OFF" (string-append "-DSPIRV-Headers_SOURCE_DIR=" (assoc-ref %build-inputs "spirv-headers"))))) @@ -183,7 +187,7 @@ interpretation of the specifications for these languages.") (define-public vulkan-headers (package (name "vulkan-headers") - (version "1.2.164") + (version "1.2.202") (source (origin (method git-fetch) @@ -193,7 +197,7 @@ interpretation of the specifications for these languages.") (file-name (git-file-name name version)) (sha256 (base32 - "11wzxvwim4jna1yssbmprl211dhmz8vmrd498zww3bghzlj7bljv")))) + "0lsjpxqb7k2mf0w1qadpki6vnwxr29kjg5y1jafl3pvk0mdy1azj")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; No tests. @@ -207,7 +211,7 @@ interpretation of the specifications for these languages.") (define-public vulkan-loader (package (name "vulkan-loader") - (version "1.2.162") + (version "1.2.202") (source (origin (method git-fetch) @@ -217,32 +221,23 @@ interpretation of the specifications for these languages.") (file-name (git-file-name name version)) (sha256 (base32 - "15gx9ab6w1sjq9hkpbas7z2f8f47j6mlln6p3w26qmydjj8gfjjv")))) + "1vsaa16clncz19lihgj39rdg4dspkxjay1ii6pkf6fpl1vkw1dh2")))) (build-system cmake-build-system) (arguments `(#:configure-flags ,#~(list (string-append "-DVULKAN_HEADERS_INSTALL_DIR=" #$(this-package-input "vulkan-headers")) - (string-append "-DCMAKE_INSTALL_INCLUDEDIR=" - #$(this-package-input "vulkan-headers") - "/include")) + (string-append "-DGOOGLETEST_INSTALL_DIR=" + (getcwd) "/source/external/googletest") + "-DBUILD_TESTS=ON") #:phases (modify-phases %standard-phases (add-after 'unpack 'unpack-googletest (lambda* (#:key inputs #:allow-other-keys) (let ((gtest (assoc-ref inputs "googletest:source"))) (when gtest (copy-recursively gtest "external/googletest")) - #t))) - (add-after 'unpack 'disable-loader-tests - (lambda _ - ;; Many tests require a Vulkan driver. Skip those. - (substitute* "tests/loader_validation_tests.cpp" - ((".*= vkCreateInstance.*" all) - (string-append "GTEST_SKIP();\n" all)) - (("TEST_F.*InstanceExtensionEnumerated.*" all) - (string-append all "\nGTEST_SKIP();\n"))) - #t))))) + #t)))))) (native-inputs `(("googletest:source" ,(package-source googletest)) ("libxrandr" ,libxrandr) @@ -269,7 +264,7 @@ and the ICD.") (define-public vulkan-tools (package (name "vulkan-tools") - (version "1.2.162") + (version "1.2.201") (source (origin (method git-fetch) @@ -279,7 +274,7 @@ and the ICD.") (file-name (git-file-name name version)) (sha256 (base32 - "129wzk7xj3vn3c8b4p7fzkd0npl58118s2i1d88gsfnlix54nagq")))) + "1ik90d7pygaw2pq81brqmcjiczag3biqvgpqp3cpws07glf29lf9")))) (build-system cmake-build-system) (inputs (list glslang libxrandr vulkan-loader wayland)) @@ -301,7 +296,7 @@ API.") (define-public shaderc (package (name "shaderc") - (version "2020.4") + (version "2021.3") (source (origin (method git-fetch) @@ -311,7 +306,7 @@ API.") (file-name (git-file-name name version)) (sha256 (base32 - "07h78nd964h2bdm4drzws8i1gvyal8a3wlhbcm5qxqk6vknv8hrk")))) + "0qjwixcx74dvx68jl51x2mp2q1346hvhwxr8w3wk36nzla62k2s6")))) (build-system cmake-build-system) (arguments `(;; FIXME: Skip most of the tests, because enabling system gtest breaks @@ -402,3 +397,59 @@ shader compilation.") (synopsis "Direct3D 12 to Vulkan translation library") (description "vkd3d is a library for translating Direct3D 12 to Vulkan.") (license license:lgpl2.1)))) + +(define-public vulkan-validationlayers + (package + (name "vulkan-validationlayers") + (version "1.2.201") + (source (origin + (method git-fetch) + (uri (git-reference + (url + "https://github.com/KhronosGroup/Vulkan-ValidationLayers") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jnz9cmy5d5g6jh9p4wr0qrlqlpfp07b3cizq37i5p1bcabdgmrz")))) + (build-system cmake-build-system) + (inputs (list glslang + libxrandr + mesa + shaderc + spirv-tools + vulkan-loader + wayland)) + (native-inputs (list pkg-config python spirv-headers vulkan-headers)) + (arguments + (list #:tests? #f ;no tests + #:configure-flags + #~(list "-DUSE_ROBIN_HOOD_HASHING=OFF" + (string-append "-DGLSLANG_INSTALL_DIR=" + (dirname (dirname + (search-input-directory + %build-inputs + "include/glslang")))) + (string-append "-DSPIRV_HEADERS_INSTALL_DIR=" + (dirname (dirname + (search-input-directory + %build-inputs + "include/spirv")))) + "-Wno-dev") + #:phases #~(modify-phases %standard-phases + (add-after 'install 'set-layer-path-in-manifest + (lambda _ + (let ((manifest (string-append #$output + "/share/vulkan/explicit_layer.d" + "/VkLayer_khronos_validation.json"))) + (substitute* manifest + (("\"libVkLayer_khronos_validation.so\"") + (string-append "\"" #$output + "/lib/libVkLayer_khronos_validation.so\""))))))))) + (home-page "https://github.com/KhronosGroup/Vulkan-ValidationLayers") + (synopsis "Khronos official validation layers for Vulkan") + (description + "Vulkan-ValidationLayers provides the Khronos official validation layers that +can assist development by enabling developers to verify their applications correctly +use the Vulkan API.") + (license license:asl2.0))) |