From cb4266a1a21f4e16d4d32bbca683b5aae938986d Mon Sep 17 00:00:00 2001
From: Rutger Helling <address@hidden>
Date: Sat, 9 Dec 2017 00:28:36 +0100
Subject: [PATCH] gnu: mesa: Enable Vulkan drivers for Intel and Radeon on
 x86-64.

* gnu/packages/gl.scm (mesa)[arguments]: Add
"--with-vulkan-drivers=intel,radeon" to configure-flags for
x86_64-linux. [synopsis]: Mention Vulkan. [description]: Mention Vulkan.
---
 gnu/packages/gl.scm | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 005b49b86..b18861eb7 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -296,6 +296,13 @@ also known as DXTn or DXTC) for Mesa.")
          ;; are stuck at OpenGL 2.1 instead of OpenGL 3.0+.
          "--enable-texture-float"
 
+         ;; Enable Vulkan on x86-64.
+         ,@(match (%current-system)
+             ((or "x86_64-linux")
+                '("--with-vulkan-drivers=intel,radeon"))
+             (_
+              '("")))
+
          ;; Also enable the tests.
          "--enable-gallium-tests"
 
@@ -343,11 +350,11 @@ also known as DXTn or DXTC) for Mesa.")
                   (string-append "\"" out "/lib/dri/gbm_dri.so")))
                #t))))))
     (home-page "https://mesa3d.org/")
-    (synopsis "OpenGL implementation")
-    (description "Mesa is a free implementation of the OpenGL specification -
-a system for rendering interactive 3D graphics.  A variety of device drivers
-allows Mesa to be used in many different environments ranging from software
-emulation to complete hardware acceleration for modern GPUs.")
+    (synopsis "OpenGL and Vulkan implementations")
+    (description "Mesa is a free implementation of the OpenGL and Vulkan
+specifications - systems for rendering interactive 3D graphics.  A variety of
+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-public mesa-headers
-- 
2.15.1