diff options
author | Joonbum Ko <joonbum.ko@samsung.com> | 2024-04-16 10:48:44 +0900 |
---|---|---|
committer | Joonbum Ko <joonbum.ko@samsung.com> | 2024-06-18 11:05:27 +0900 |
commit | ab3c25cf12498a450b155019760a2319826a088a (patch) | |
tree | 82b5ad3be7f6d2be037a6987dbecc2a26fc30c82 | |
parent | d79e47c3a485da1fa61f4a59fcae6db45fdfd4f5 (diff) | |
download | mesa-ab3c25cf12498a450b155019760a2319826a088a.tar.gz mesa-ab3c25cf12498a450b155019760a2319826a088a.tar.bz2 mesa-ab3c25cf12498a450b155019760a2319826a088a.zip |
Add virgl option to use virtio_gpu
Change-Id: I6cdb3bf3f105ca22f6adc48ad5076348f34ece41
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
-rw-r--r-- | packaging/mesa.spec | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/packaging/mesa.spec b/packaging/mesa.spec index 7d39fcdc5a6..505e6630dd4 100644 --- a/packaging/mesa.spec +++ b/packaging/mesa.spec @@ -39,10 +39,21 @@ ExclusiveArch: %define enable_driver() %{expand:%%{?!enable_%{1}: %%global enable_%{1} 1}} +%define append_drivers() %{?gallium_drivers: %global gallium_drivers %{expand:%{gallium_drivers}},%{expand:%{1}}}\ + %{?!gallium_drivers: %global gallium_drivers %{expand:%{1}}} + +%define enable_gallium_driver() \ + %append_drivers %{1} \ + %enable_driver %{1} + %ifarch %ix86 x86_64 -%define gallium_drivers "i915,swrast" +%enable_gallium_driver i915 +%enable_gallium_driver swrast +%enable_gallium_driver virgl + %define vulkan_drivers "" %define dri_drivers "" + %else %define USE_GBM 0 %define USE_VULKAN 1 @@ -53,11 +64,18 @@ ExclusiveArch: %if %{USE_VULKAN} == 1 %enable_driver vulkan %endif -%define gallium_drivers "vc4,v3d,kmsro,swrast" + +%enable_gallium_driver kmsro +%enable_gallium_driver swrast +%enable_gallium_driver vc4 +%enable_gallium_driver v3d +%enable_gallium_driver virgl + %define vulkan_drivers "%{?enable_vulkan:%{VULKAN_DRIVER}}" %define dri_drivers "auto" %endif +%{echo: enabled gallium drivers : %{expand:%{gallium_drivers}}} %description Mesa is a 3-D graphics library with an API which is very similar to @@ -99,7 +117,6 @@ meson setup --prefix %{_hal_prefix} build/ \ -Dgallium-drivers=%{gallium_drivers} \ -Dvulkan-drivers=%{vulkan_drivers} - ninja -C build/ %install @@ -127,7 +144,22 @@ cp COPYING %{buildroot}%{_hal_prefix}/share/licenses/%{name}/ %{_hal_prefix}/share/licenses/%{name}/COPYING %{_hal_libdir}/libglapi* %{_hal_libdir}/driver/* -%{_hal_libdir}/dri/* +%if %{expand:%{?enable_vc4:1}%{?!enable_vc4:0}} +%{_hal_libdir}/dri/vc4_dri.so +%endif +%if %{expand:%{?enable_v3d:1}%{?!enable_v3d:0}} +%{_hal_libdir}/dri/v3d_dri.so +%endif +%if %{expand:%{?enable_swrast:1}%{?!enable_swrast:0}} +%{_hal_libdir}/dri/swrast_dri.so +%endif +%if %{expand:%{?enable_virgl:1}%{?!enable_virgl:0}} +%{_hal_libdir}/dri/virtio_gpu_dri.so +%endif +%if %{expand:%{?enable_i915:1}%{?!enable_i915:0}} +%{_hal_libdir}/dri/i915_dri.so +%endif + %if "%{USE_GBM}" == "1" %{_hal_libdir}/libgbm* %endif |