summary refs log tree commit diff
path: root/gnu/packages/gl.scm
diff options
context:
space:
mode:
authorLilah Tascheter <lilah@lunabee.space>2023-07-08 13:29:28 -0500
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-07-16 09:18:09 +0200
commit45491ea8da85ad977ca11f4595a7ddeb22146b0d (patch)
tree550ca966eda75b91ced6d1a0a1f035df124093a6 /gnu/packages/gl.scm
parent1ef314fa58073cc688f536a38580ab9db2bd9f1d (diff)
downloadguix-45491ea8da85ad977ca11f4595a7ddeb22146b0d.tar.gz
gnu: mesa: Fix Vulkan on older Intel GPUs.
Mesa split the Vulkan intel driver into two: intel and intel_hasvk.
Enables intel_hasvk so vulkan functions on older intel GPUs again, and
swrast for lavapipe as a fallback.

* gnu/packages/gl.scm (mesa-vulkan-hasvk): New variable.
(mesa): Graft with mesa-vulkan-hasvk.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/gl.scm')
-rw-r--r--gnu/packages/gl.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 9885bde712..1691086e1a 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -279,6 +279,7 @@ also known as DXTn or DXTC) for Mesa.")
          (base32
           "1mcjf41x2bhxs6yxars7nh2vfryfw50g6rvbcfbb1wqdv2jn4qrq"))))
     (build-system meson-build-system)
+    (replacement mesa-vulkan-hasvk)
     (propagated-inputs
      ;; The following are in the Requires.private field of gl.pc.
      (list libdrm
@@ -526,6 +527,21 @@ device drivers allows Mesa to be used in many different environments ranging
 from software emulation to complete hardware acceleration for modern GPUs.")
     (license license:x11)))
 
+(define mesa-vulkan-hasvk
+  (let ((graft mesa)
+        (vulk "-Dvulkan-drivers=intel,amd"))
+    (package
+      (inherit graft)
+      (arguments
+        (substitute-keyword-arguments (package-arguments graft)
+          ((#:configure-flags flags)
+           #~(begin
+               (use-modules (ice-9 match))
+               (map (match-lambda
+                      (#$vulk (string-append #$vulk ",intel_hasvk,swrast"))
+                      (x x))
+                 #$flags))))))))
+
 (define-public mesa-opencl
   (package/inherit mesa
     (name "mesa-opencl")