SHA256
1
0
forked from pool/Mesa

Accepting request 1059034 from home:mnhauke:branches:X11:XOrg

- Add support for Rusticl - Mesa's new OpenCL implementation.
  * See https://docs.mesa3d.org/rusticl
  You will need to set your environment to use it
  * See https://docs.mesa3d.org/envvars#rusticl-environment-variables

- Fix some deprecation warnings
  * WARNING: option "false" deprecated, please use "disabled" instead.
  * WARNING: option "true" deprecated, please use "enabled" instead.

OBS-URL: https://build.opensuse.org/request/show/1059034
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1177
This commit is contained in:
Stefan Dirsch 2023-01-18 15:05:39 +00:00 committed by Git OBS Bridge
parent 8aa7bee06f
commit 6d002ac08e
2 changed files with 74 additions and 17 deletions

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Jan 16 22:44:11 UTC 2023 - Martin Hauke <mardnh@gmx.de>
- Add support for Rusticl - Mesa's new OpenCL implementation.
* See https://docs.mesa3d.org/rusticl
You will need to set your environment to use it
* See https://docs.mesa3d.org/envvars#rusticl-environment-variables
-------------------------------------------------------------------
Sun Jan 15 12:40:15 UTC 2023 - Martin Hauke <mardnh@gmx.de>
- Fix some deprecation warnings
* WARNING: option "false" deprecated, please use "disabled" instead.
* WARNING: option "true" deprecated, please use "enabled" instead.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 11 21:00:56 UTC 2023 - Alexei Sorokin <sor.alexei@meowr.ru> Wed Jan 11 21:00:56 UTC 2023 - Alexei Sorokin <sor.alexei@meowr.ru>

View File

@ -44,6 +44,7 @@
%define _name_archive mesa %define _name_archive mesa
%define _version 22.3.3 %define _version 22.3.3
%define with_opencl 0 %define with_opencl 0
%define with_rusticl 0
%define with_vulkan 0 %define with_vulkan 0
%define with_llvm 0 %define with_llvm 0
@ -95,6 +96,11 @@
%if "%{flavor}" == "drivers" %if "%{flavor}" == "drivers"
%define glamor 0 %define glamor 0
%if 0%{?suse_version} > 1550
%ifnarch s390 s390x
%define with_rusticl 1
%endif
%endif
%else %else
# No llvm dependencies # No llvm dependencies
%define with_llvm 0 %define with_llvm 0
@ -269,6 +275,12 @@ BuildRequires: clang9-devel
%endif %endif
%endif %endif
BuildRequires: libclc BuildRequires: libclc
%if 0%{with_rusticl}
BuildRequires: rust
BuildRequires: rust-bindgen
BuildRequires: pkgconfig(LLVMSPIRVLib)
BuildRequires: pkgconfig(SPIRV-Tools)
%endif
%endif %endif
Requires: Mesa-libEGL1 = %{version} Requires: Mesa-libEGL1 = %{version}
@ -643,7 +655,7 @@ Group: System/Libraries
This package contains the VDPAU state tracker for VirtIO GPU. This package contains the VDPAU state tracker for VirtIO GPU.
%package -n Mesa-libOpenCL %package -n Mesa-libOpenCL
Summary: Mesa OpenCL implementation Summary: Mesa OpenCL implementation (Clover)
Group: System/Libraries Group: System/Libraries
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300
Requires: libclc(llvm%{_llvm_sonum}) Requires: libclc(llvm%{_llvm_sonum})
@ -654,6 +666,18 @@ Requires: libclc
%description -n Mesa-libOpenCL %description -n Mesa-libOpenCL
This package contains the Mesa OpenCL implementation or GalliumCompute. This package contains the Mesa OpenCL implementation or GalliumCompute.
%package -n Mesa-libRusticlOpenCL
Summary: Mesa OpenCL implementation (Rusticl)
Group: System/Libraries
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300
Requires: libclc(llvm%{_llvm_sonum})
%else
Requires: libclc
%endif
%description -n Mesa-libRusticlOpenCL
This package contains the Mesa Rust-written OpenCL implementation.
%package -n Mesa-libva %package -n Mesa-libva
Summary: Mesa VA-API implementation Summary: Mesa VA-API implementation
Group: System/Libraries Group: System/Libraries
@ -783,49 +807,53 @@ egl_platforms=x11,wayland
%meson \ %meson \
--auto-features=disabled \ --auto-features=disabled \
%if "%{flavor}" == "drivers" %if "%{flavor}" == "drivers"
-Dgles1=false \ -Dgles1=disabled \
-Dgles2=false \ -Dgles2=disabled \
-Degl=true \ -Degl=enabled \
-Dglx=disabled \ -Dglx=disabled \
-Dosmesa=false \ -Dosmesa=false \
%else %else
-Dglvnd=true \ -Dglvnd=true \
-Dgles1=true \ -Dgles1=enabled \
-Dgles2=true \ -Dgles2=enabled \
-Degl=true \ -Degl=enabled \
-Dosmesa=true \ -Dosmesa=true \
-Dglx=auto \ -Dglx=auto \
-Dllvm=false \ -Dllvm=disabled \
-Dvulkan-drivers= \ -Dvulkan-drivers= \
%endif %endif
-Dplatforms=$egl_platforms \ -Dplatforms=$egl_platforms \
-Ddri3=true \ -Ddri3=enabled \
-Dshared-glapi=true \ -Dshared-glapi=enabled \
%if 0%{?with_nine} %if 0%{?with_nine}
-Dgallium-nine=true \ -Dgallium-nine=true \
%endif %endif
%if %{glamor} %if %{glamor}
-Dgbm=true \ -Dgbm=enabled \
%endif %endif
%if 0%{with_opencl} %if 0%{with_opencl}
-Dgallium-opencl=icd \ -Dgallium-opencl=icd \
%if 0%{?suse_version} >= 1550 %if 0%{?suse_version} >= 1550
--sysconfdir=%{_datadir} \ --sysconfdir=%{_datadir} \
%endif %endif
%if 0%{with_rusticl}
-Dgallium-rusticl=true \
-Drust_std=2021 \
%endif
%endif %endif
-Ddri-search-path=%{_libdir}/dri \ -Ddri-search-path=%{_libdir}/dri \
%if 0%{with_llvm} %if 0%{with_llvm}
-Dllvm=true \ -Dllvm=enabled \
-Dshared-llvm=true \ -Dshared-llvm=enabled \
%endif %endif
%if "%{flavor}" == "drivers" %if "%{flavor}" == "drivers"
%if %{video_codecs} %if %{video_codecs}
-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec \ -Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec \
%endif %endif
%if %{gallium_loader} %if %{gallium_loader}
-Dgallium-vdpau=true \ -Dgallium-vdpau=enabled \
-Dgallium-va=true \ -Dgallium-va=enabled \
-Dgallium-xa=true \ -Dgallium-xa=enabled \
%endif %endif
%if 0%{with_vulkan} %if 0%{with_vulkan}
-Dvulkan-drivers=%{?vulkan_drivers} \ -Dvulkan-drivers=%{?vulkan_drivers} \
@ -855,7 +883,7 @@ egl_platforms=x11,wayland
-Dgallium-drivers=swrast \ -Dgallium-drivers=swrast \
%endif %endif
%ifarch aarch64 %{ix86} x86_64 ppc64le s390x %ifarch aarch64 %{ix86} x86_64 ppc64le s390x
-Dvalgrind=true \ -Dvalgrind=enabled \
%endif %endif
-Db_ndebug=true \ -Db_ndebug=true \
-Dc_args="%{optflags}" \ -Dc_args="%{optflags}" \
@ -1161,6 +1189,20 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
%{_libdir}/libMesaOpenCL.so* %{_libdir}/libMesaOpenCL.so*
%endif %endif
%if 0%{with_rusticl}
%files -n Mesa-libRusticlOpenCL
%if 0%{?suse_version} >= 1550
%dir %{_datadir}/OpenCL
%dir %{_datadir}/OpenCL/vendors
%{_datadir}/OpenCL/vendors/rusticl.icd
%else
%dir %{_sysconfdir}/OpenCL
%dir %{_sysconfdir}/OpenCL/vendors
%{_sysconfdir}/OpenCL/vendors/rusticl.icd
%endif
%{_libdir}/libRusticlOpenCL.so*
%endif
%if "%{flavor}" == "drivers" %if "%{flavor}" == "drivers"
%ifarch %{ix86} x86_64 aarch64 %{arm} ppc64 ppc64le riscv64 %ifarch %{ix86} x86_64 aarch64 %{arm} ppc64 ppc64le riscv64
%files -n Mesa-libva %files -n Mesa-libva