From ebe2b43f70f1d7cf7d60f8405f2f6634d35ff310 Mon Sep 17 00:00:00 2001 From: Tianhao Ni Date: Mon, 10 May 2021 10:26:31 +0800 Subject: [PATCH] Enable vulkan support for mesa: 1. Set "USE_VULKAN" to 1 in spec file to enable vulkan support. Change-Id: I15e9c8a70f88ffc595d8f4a4ffb37d99e9bf214d Signed-off-by: Tianhao Ni --- packaging/mesa.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packaging/mesa.spec b/packaging/mesa.spec index fd5230b..b40395b 100644 --- a/packaging/mesa.spec +++ b/packaging/mesa.spec @@ -36,6 +36,8 @@ BuildRequires: pkgconfig(libdrm_intel) >= 2.4.24 ExclusiveArch: %endif +%define USE_VULKAN 0 + %description Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL.* To the extent that Mesa utilizes the OpenGL command @@ -76,6 +78,9 @@ meson --prefix %{_prefix} build/ \ -Ddri-drivers="" \ -Dvulkan-drivers="" %else +%if "%{USE_VULKAN}" == "1" + -Dvulkan-drivers="broadcom" \ +%endif -Dgallium-drivers="vc4,v3d,kmsro,swrast" %endif ninja -C build/ @@ -101,4 +106,8 @@ cp 99-GPU-Acceleration.rules %{buildroot}%{_udevrulesdir} %{_libdir}/driver/* %{_libdir}/dri/* %{_libdir}/libgbm* +%if "%{USE_VULKAN}" == "1" +%{_libdir}/libvulkan* +/usr/share/vulkan/icd.d/* +%endif %{_udevrulesdir}/99-GPU-Acceleration.rules -- 2.7.4