$ git diff --patch-with-stat --summary a23bd644635f68e057024e298dde8dbf6c0f06d5..b0ba02d9f582b80b85cccf29b7c9ab4311a8a736
.abf.yml | 2 +-
1084.diff | 102 ++++++++++++++++++++++++
mesa-19.1.0-compile-bug-110709.patch | 33 --------
mesa.spec | 147 +++++++++++++++++++++++++----------
riscv64.patch | 32 ++++++++
5 files changed, 242 insertions(+), 74 deletions(-)
create mode 100644 1084.diff
delete mode 100644 mesa-19.1.0-compile-bug-110709.patch
create mode 100644 riscv64.patch
diff --git a/.abf.yml b/.abf.yml
index 3eca55c..f4d604a 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- mesa-19.1.0-rc4.tar.xz: 11203b0bfb44c77410795067f3ce8b6eed2afdae
+ mesa-19.1.4.tar.xz: 393053bfa41b7fc65add756713004f034c39c3ce
diff --git a/1084.diff b/1084.diff
new file mode 100644
index 0000000..9bda924
--- /dev/null
+++ b/1084.diff
@@ -0,0 +1,102 @@
+diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
+index f3f8cbee778ebc166854d1d396b1bb5ec84149c6..077e2131bfd74f660097d9325cd7d35d8fe72f78 100644
+--- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c
++++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c
+@@ -201,10 +201,11 @@ create_frag_shader(struct vl_bicubic_filter *filter, unsigned video_width,
+
+ ureg_FLR(shader, ureg_writemask(t_array[22], TGSI_WRITEMASK_XY),
+ ureg_src(t_array[22]));
+- ureg_DIV(shader, ureg_writemask(t_array[22], TGSI_WRITEMASK_XY),
+- ureg_src(t_array[22]), ureg_imm2f(shader, video_width, video_height));
+- ureg_ADD(shader, ureg_writemask(t_array[22], TGSI_WRITEMASK_XY),
+- ureg_src(t_array[22]), half_pixel);
++
++ ureg_MAD(shader, ureg_writemask(t_array[22], TGSI_WRITEMASK_XY),
++ ureg_src(t_array[22]),
++ ureg_imm2f(shader, 1.0f / video_width, 1.0f / video_height),
++ half_pixel);
+
+ /*
+ * t_array[0..*] = vtex + offset[0..*]
+diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
+index 12c58ff7436db2ac865b4847f553646e9a767dd8..b925980b7ce49a9029c46ae4067a38f5cb0833de 100644
+--- a/src/gallium/auxiliary/vl/vl_compositor.c
++++ b/src/gallium/auxiliary/vl/vl_compositor.c
+@@ -70,7 +70,7 @@ init_shaders(struct vl_compositor *c)
+ return false;
+ }
+
+- if (c->pipe_compute_supported) {
++ if (c->pipe_cs_composit_supported) {
+ c->cs_video_buffer = vl_compositor_cs_create_shader(c, compute_shader_video_buffer);
+ if (!c->cs_video_buffer) {
+ debug_printf("Unable to create video_buffer compute shader.\n");
+@@ -125,7 +125,7 @@ static void cleanup_shaders(struct vl_compositor *c)
+ c->pipe->delete_fs_state(c->pipe, c->fs_rgb_yuv.y);
+ c->pipe->delete_fs_state(c->pipe, c->fs_rgb_yuv.uv);
+
+- if (c->pipe_compute_supported) {
++ if (c->pipe_cs_composit_supported) {
+ c->pipe->delete_compute_state(c->pipe, c->cs_video_buffer);
+ c->pipe->delete_compute_state(c->pipe, c->cs_weave_rgb);
+ c->pipe->delete_compute_state(c->pipe, c->cs_rgba);
+@@ -561,7 +561,7 @@ vl_compositor_set_buffer_layer(struct vl_compositor_state *s,
+ float half_a_line = 0.5f / s->layers[layer].zw.y;
+ switch(deinterlace) {
+ case VL_COMPOSITOR_WEAVE:
+- if (c->pipe_compute_supported)
++ if (c->pipe_cs_composit_supported)
+ s->layers[layer].cs = c->cs_weave_rgb;
+ else
+ s->layers[layer].fs = c->fs_weave_rgb;
+@@ -571,7 +571,7 @@ vl_compositor_set_buffer_layer(struct vl_compositor_state *s,
+ s->layers[layer].zw.x = 0.0f;
+ s->layers[layer].src.tl.y += half_a_line;
+ s->layers[layer].src.br.y += half_a_line;
+- if (c->pipe_compute_supported)
++ if (c->pipe_cs_composit_supported)
+ s->layers[layer].cs = c->cs_video_buffer;
+ else
+ s->layers[layer].fs = c->fs_video_buffer;
+@@ -581,7 +581,7 @@ vl_compositor_set_buffer_layer(struct vl_compositor_state *s,
+ s->layers[layer].zw.x = 1.0f;
+ s->layers[layer].src.tl.y -= half_a_line;
+ s->layers[layer].src.br.y -= half_a_line;
+- if (c->pipe_compute_supported)
++ if (c->pipe_cs_composit_supported)
+ s->layers[layer].cs = c->cs_video_buffer;
+ else
+ s->layers[layer].fs = c->fs_video_buffer;
+@@ -589,7 +589,7 @@ vl_compositor_set_buffer_layer(struct vl_compositor_state *s,
+ }
+
+ } else {
+- if (c->pipe_compute_supported)
++ if (c->pipe_cs_composit_supported)
+ s->layers[layer].cs = c->cs_video_buffer;
+ else
+ s->layers[layer].fs = c->fs_video_buffer;
+@@ -757,7 +757,9 @@ vl_compositor_init(struct vl_compositor *c, struct pipe_context *pipe)
+
+ memset(c, 0, sizeof(*c));
+
+- c->pipe_compute_supported = pipe->screen->get_param(pipe->screen, PIPE_CAP_COMPUTE);
++ c->pipe_cs_composit_supported = pipe->screen->get_param(pipe->screen, PIPE_CAP_COMPUTE) &&
++ pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_TEX_TXF_LZ);
++
+ c->pipe = pipe;
+
+ if (!init_pipe_state(c)) {
+diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h
+index d42618824a7281b0e05cd82b10e50babd1985136..ae06c153d5b7229cada2a564e12c2f9e36f65f29 100644
+--- a/src/gallium/auxiliary/vl/vl_compositor.h
++++ b/src/gallium/auxiliary/vl/vl_compositor.h
+@@ -121,7 +121,7 @@ struct vl_compositor
+ void *cs_weave_rgb;
+ void *cs_rgba;
+
+- bool pipe_compute_supported;
++ bool pipe_cs_composit_supported;
+
+ struct {
+ struct {
diff --git a/mesa-19.1.0-compile-bug-110709.patch b/mesa-19.1.0-compile-bug-110709.patch
deleted file mode 100644
index f9e82f4..0000000
--- a/mesa-19.1.0-compile-bug-110709.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -up mesa-19.1.0-rc2/src/glx/g_glxglvnddispatchfuncs.c.omv~ mesa-19.1.0-rc2/src/glx/g_glxglvnddispatchfuncs.c
---- mesa-19.1.0-rc2/src/glx/g_glxglvnddispatchfuncs.c.omv~ 2019-05-19 15:49:37.278203648 +0200
-+++ mesa-19.1.0-rc2/src/glx/g_glxglvnddispatchfuncs.c 2019-05-19 15:52:26.775930013 +0200
-@@ -143,7 +143,7 @@ static GLXFBConfigSGIX *dispatch_ChooseF
- if (pChooseFBConfigSGIX == NULL)
- return NULL;
-
-- ret = (*pChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
-+ ret = (*pChooseFBConfigSGIX)(dpy, screen, (int*)attrib_list, nelements);
- if (AddFBConfigsMapping(dpy, ret, nelements, dd)) {
- free(ret);
- return NULL;
-@@ -234,7 +234,7 @@ static GLXPbuffer dispatch_CreateGLXPbuf
- if (pCreateGLXPbufferSGIX == NULL)
- return None;
-
-- ret = (*pCreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);
-+ ret = (*pCreateGLXPbufferSGIX)(dpy, config, width, height, (int*)attrib_list);
- if (AddDrawableMapping(dpy, ret, dd)) {
- PFNGLXDESTROYGLXPBUFFERSGIXPROC pDestroyGLXPbufferSGIX;
-
-diff -up mesa-19.1.0-rc2/src/glx/glxglvnd.c.omv~ mesa-19.1.0-rc2/src/glx/glxglvnd.c
---- mesa-19.1.0-rc2/src/glx/glxglvnd.c.omv~ 2019-05-19 15:53:36.667481737 +0200
-+++ mesa-19.1.0-rc2/src/glx/glxglvnd.c 2019-05-19 15:53:43.468439825 +0200
-@@ -41,7 +41,7 @@ static void *__glXGLVNDGetDispatchAddres
- {
- unsigned internalIndex = FindGLXFunction(procName);
-
-- return __glXDispatchFunctions[internalIndex];
-+ return (void*)__glXDispatchFunctions[internalIndex];
- }
-
- static void __glXGLVNDSetDispatchIndex(const GLubyte *procName, int index)
diff --git a/mesa.spec b/mesa.spec
index 90b120b..288fb80 100644
--- a/mesa.spec
+++ b/mesa.spec
@@ -4,9 +4,10 @@
# (aco) Needed for the dri drivers
%define _disable_ld_no_undefined 1
-%ifarch %{aarch64}
-%global optflags %{optflags} -fuse-ld=bfd
-%endif
+# LLD fails because of https://bugs.llvm.org/show_bug.cgi?id=42447
+# BFD fails because it can't handle clang LTO bitcode in static libraries
+%global optflags %{optflags} -O3 -fuse-ld=gold
+%global ldflags %{ldflags} -fuse-ld=gold
%define git %{nil}
%define git_branch %(echo %{version} |cut -d. -f1-2)
@@ -14,20 +15,23 @@
# (tpg) starting version 11.1.1 this may fully support OGL 4.1
%define opengl_ver 4.5
-%define relc 4
+%define relc %{nil}
-# bootstrap option: Build without requiring an X server
-# (which in turn requires mesa to build)
-%bcond_without hardware
%ifarch %{ix86}
%define _disable_lto 1
%endif
+%ifarch %{riscv}
+%bcond_without gcc
+%bcond_with opencl
+%else
%bcond_with gcc
+%bcond_without opencl
+%endif
%bcond_with bootstrap
%bcond_without vdpau
%bcond_without va
+%bcond_without glvnd
%bcond_without egl
-%bcond_without opencl
%ifarch %{ix86} %{x86_64}
%bcond_without intel
%else
@@ -114,7 +118,7 @@
Summary: OpenGL %{opengl_ver} compatible 3D graphics library
Name: mesa
-Version: 19.1.0
+Version: 19.1.4
%if "%{relc}%{git}" == ""
Release: 1
%else
@@ -153,7 +157,6 @@ Obsoletes: %{name}-xorg-drivers-nouveau < %{EVRD}
# https://bugs.freedesktop.org/show_bug.cgi?id=74098
Patch1: mesa-10.2-clang-compilefix.patch
-Patch2: mesa-19.1.0-compile-bug-110709.patch
Patch3: mesa-19.0.0-rc2-more-ARM-drivers.patch
# fedora patches
@@ -178,6 +181,10 @@ Patch15: mesa-9.2-hardware-float.patch
# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/'
Patch201: 0201-revert-fix-glxinitializevisualconfigfromtags-handling.patch
+Patch202: riscv64.patch
+# https://bugs.freedesktop.org/show_bug.cgi?id=110783
+# https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1084
+#Patch203: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1084.diff
# Direct3D patchset -- https://wiki.ixit.cz/d3d9
#
@@ -207,8 +214,9 @@ BuildRequires: libatomic-devel
BuildRequires: python-mako >= 0.8.0
BuildRequires: pkgconfig(libdrm) >= 2.4.56
BuildRequires: pkgconfig(libudev) >= 186
-BuildRequires: pkgconfig(talloc)
+%if %{with glvnd}
BuildRequires: pkgconfig(libglvnd)
+%endif
BuildRequires: pkgconfig(vulkan)
BuildRequires: pkgconfig(x11) >= 1.3.3
BuildRequires: pkgconfig(xdamage) >= 1.1.1
@@ -233,7 +241,8 @@ BuildRequires: stdc++-static-devel
BuildRequires: pkgconfig(libssl) >= 1.1.1b-5
%if %{with opencl}
BuildRequires: pkgconfig(libclc)
-BuildRequires: clang-devel clang
+BuildRequires: clang-devel
+BuildRequires: clang
%endif
BuildRequires: pkgconfig(xvmc)
%if %{with vdpau}
@@ -257,7 +266,7 @@ Summary: Mesa DRI drivers
Group: System/Libraries
Requires: %{dridrivers}-swrast = %{EVRD}
Requires: %{dridrivers}-virtio = %{EVRD}
-%ifnarch %{armx}
+%ifnarch %{armx} %{riscv}
%if %{with r600}
Requires: %{dridrivers}-radeon = %{EVRD}
%endif
@@ -266,12 +275,14 @@ Requires: %{dridrivers}-intel = %{EVRD}
%endif
Requires: %{dridrivers}-nouveau = %{EVRD}
%endif
-%ifarch %{armx}
+%ifarch %{armx} %{riscv}
Requires: %{dridrivers}-freedreno = %{EVRD}
Requires: %{dridrivers}-vc4 = %{EVRD}
Requires: %{dridrivers}-v3d = %{EVRD}
Requires: %{dridrivers}-etnaviv = %{EVRD}
Requires: %{dridrivers}-tegra = %{EVRD}
+Requires: %{dridrivers}-lima = %{EVRD}
+Requires: %{dridrivers}-panfrost = %{EVRD}
Requires: %{dridrivers}-kmsro = %{EVRD}
%endif
Provides: dri-drivers = %{EVRD}
@@ -285,7 +296,6 @@ Summary: DRI Drivers for AMD/ATI Radeon graphics chipsets
Group: System/Libraries
Conflicts: %{mklibname dri-drivers} < 9.1.0-0.20130130.2
Conflicts: libva-vdpau-driver < 17.3.0
-%define __noautoreq '.*llvmradeon.*'
%description -n %{dridrivers}-radeon
DRI and XvMC drivers for AMD/ATI Radeon graphics chipsets
@@ -337,7 +347,7 @@ Conflicts: %{mklibname dri-drivers} < 9.1.0-0.20130130.2
%description -n %{dridrivers}-virtio
Generic DRI driver for virtual environments.
-%ifarch %{armx}
+%ifarch %{armx} %{riscv}
%package -n %{dridrivers}-freedreno
Summary: DRI Drivers for Adreno graphics chipsets
Group: System/Libraries
@@ -377,6 +387,20 @@ Conflicts: %{mklibname dri-drivers} < 9.1.0-0.20130130.2
%description -n %{dridrivers}-tegra
DRI and XvMC drivers for Tegra graphics chips
+%package -n %{dridrivers}-lima
+Summary: DRI Drivers for Mali Utgard devices
+Group: System/Libraries
+
+%description -n %{dridrivers}-lima
+DRI drivers for Mali Utgard devices
+
+%package -n %{dridrivers}-panfrost
+Summary: DRI Drivers for Mali Midgard and Bifrost devices
+Group: System/Libraries
+
+%description -n %{dridrivers}-panfrost
+DRI drivers for Mali Midgard and Bifrost devices
+
%package -n %{dridrivers}-kmsro
Summary: DRI Drivers for KMS-only devices
Group: System/Libraries
@@ -414,7 +438,9 @@ Requires: %{_lib}udev1
Requires: %{_lib}GL1%{?_isa}
Provides: mesa-libGL%{?_isa} = %{EVRD}
Requires: %mklibname GL 1
+%if %{with glvnd}
Requires: libglvnd-GL
+%endif
%define oldglname %mklibname gl 1
%rename %oldglname
@@ -433,7 +459,9 @@ Conflicts: %{libgl} < %{version}-%{release}
%else
Requires: %{libgl} = %{version}-%{release}
%endif
+%if %{with glvnd}
Requires: pkgconfig(libglvnd)
+%endif
# GL/glext.h uses KHR/khrplatform.h
Requires: %{devegl} = %{EVRD}
Obsoletes: %{_lib}mesagl1-devel < 8.0
@@ -460,7 +488,9 @@ Summary: Files for Mesa (EGL libs)
Group: System/Libraries
Obsoletes: %{_lib}mesaegl1 < 8.0
Provides: mesa-libEGL%{?_isa} = %{EVRD}
+%if %{with glvnd}
Requires: libglvnd-egl
+%endif
%define oldegl %mklibname egl 1
%rename %oldegl
@@ -546,11 +576,13 @@ This package provides the OpenGL ES library version 1.
Summary: Development files for glesv1 libs
Group: Development/C
Requires: %{libglesv1}
+%if %{with glvnd}
Requires: libglvnd-GLESv1_CM
-Obsoletes: %{_lib}mesaglesv1_1-devel < 8.0
-Obsoletes: %{_lib}glesv1_1-devel < %{version}-%{release}
# For libGLESv1_CM.so symlink
Requires: pkgconfig(libglvnd)
+%endif
+Obsoletes: %{_lib}mesaglesv1_1-devel < 8.0
+Obsoletes: %{_lib}glesv1_1-devel < %{version}-%{release}
%description -n %{devglesv1}
This package contains the headers needed to compile OpenGL ES 1 programs.
@@ -559,8 +591,10 @@ This package contains the headers needed to compile OpenGL ES 1 programs.
Summary: Files for Mesa (glesv2 libs)
Group: System/Libraries
Obsoletes: %{_lib}mesaglesv2_2 < 8.0
+%if %{with glvnd}
# For libGLESv2.so symlink
Requires: pkgconfig(libglvnd)
+%endif
%description -n %{libglesv2}
OpenGL ES is a low-level, lightweight API for advanced embedded graphics using
@@ -572,7 +606,9 @@ This package provides the OpenGL ES library version 2.
Summary: Development files for glesv2 libs
Group: Development/C
Requires: %{libglesv2}
+%if %{with glvnd}
Requires: libglvnd-GLESv2
+%endif
Obsoletes: %{_lib}mesaglesv2_2-devel < 8.0
Obsoletes: %{_lib}glesv2_2-devel < %{version}-%{release}
@@ -643,7 +679,7 @@ Development files for the OpenCL library
Summary: Mesa VDPAU drivers
Group: System/Libraries
Requires: %{dridrivers} = %{EVRD}
-%ifnarch %{armx}
+%ifnarch %{armx} %{riscv}
Requires: %{_lib}vdpau-driver-nouveau
Requires: %{_lib}vdpau-driver-r300
Requires: %{_lib}vdpau-driver-radeonsi
@@ -733,7 +769,9 @@ Requires: %{devglapi} = %{version}-%{release}
Requires: %{devglesv1} = %{version}-%{release}
Requires: %{devglesv2} = %{version}-%{release}
Suggests: %{devd3d} = %{version}-%{release}
+%if %{with glvnd}
Requires: pkgconfig(libglvnd)
+%endif
%description common-devel
Mesa common metapackage devel.
@@ -763,39 +801,48 @@ export CC=gcc
export CXX=g++
%endif
-%meson \
+if ! %meson \
-Db_ndebug=true \
-Dc_std=c11 \
-Dcpp_std=c++17 \
-Dasm=true \
-Ddri-drivers=auto \
- -Ddri3=true \
- -Degl=true \
-Dgallium-drivers=auto \
+%if %{with opencl}
-Dgallium-opencl=icd \
+%else
+ -Dgallium-opencl=disabled \
+%endif
-Dgallium-va=true \
-Dgallium-vdpau=true \
-Dgallium-xa=true \
-Dgallium-xvmc=true \
-Dgallium-nine=true \
+ -Dglx=auto \
+ -Dplatforms=auto \
+ -Dvulkan-drivers=auto \
+ -Dxlib-lease=auto \
+ -Dosmesa=gallium \
+%if %{with glvnd}
+ -Dglvnd=true \
+%endif
+ -Ddri3=true \
+ -Degl=true \
-Dgbm=true \
-Dgles1=true \
-Dgles2=true \
- -Dglvnd=true \
- -Dglx=auto \
-Dglx-direct=true \
-Dllvm=true \
-Dlmsensors=true \
-Dopengl=true \
- -Dplatforms=auto \
-Dshader-cache=true \
-Dshared-glapi=true \
-Dshared-llvm=true \
-Dswr-arches=avx,avx2,knl,skx \
- -Dtools=all \
- -Dvulkan-drivers=auto \
- -Dxlib-lease=auto \
- -Dosmesa=gallium
+ -Dtools=all; then
+
+ cat build/meson-logs/meson-log.txt >/dev/stderr
+fi
%ninja_build -C build/
@@ -806,6 +853,7 @@ export CXX=g++
mkdir -p %{buildroot}%{_prefix}/lib/dri
%endif
+%if %{with opencl}
# FIXME workaround for OpenCL headers not being installed
if [ -e %{buildroot}%{_includedir}/CL/opencl.h ]; then
echo OpenCL headers are being installed correctly now. Please remove the workaround.
@@ -813,13 +861,16 @@ if [ -e %{buildroot}%{_includedir}/CL/opencl.h ]; then
else
cp -af include/CL %{buildroot}%{_includedir}/
fi
+%endif
# .so files are not needed by vdpau
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so
+%if %{with glvnd}
# We get those from libglvnd
rm -f %{buildroot}%{_libdir}/libGLESv1_CM.so* \
%{buildroot}%{_libdir}/libGLESv2.so*
+%endif
# .la files are not needed by mesa
find %{buildroot} -name '*.la' |xargs rm -f
@@ -856,6 +907,11 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%files -n %{dridrivers}-radeon
%{_libdir}/dri/r?00_dri.so
%{_libdir}/dri/radeon_dri.so
+%{_libdir}/libXvMCgallium.so
+%{_libdir}/libXvMCr?00.so
+%{_libdir}/dri/radeonsi_dri.so
+%{_libdir}/libvulkan_radeon.so
+%{_datadir}/vulkan/icd.d/radeon_icd.*.json
%if %{with opencl}
%{_libdir}/gallium-pipe/pipe_r?00.so
%endif
@@ -863,17 +919,12 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%if %{with va}
%{_libdir}/dri/r600_drv_video.so
%endif
-%{_libdir}/libXvMCgallium.so
-%{_libdir}/libXvMCr?00.so
-%{_libdir}/dri/radeonsi_dri.so
%if %{with va}
%{_libdir}/dri/radeonsi_drv_video.so
%endif
%if %{with opencl}
%{_libdir}/gallium-pipe/pipe_radeonsi.so
%endif
-%{_libdir}/libvulkan_radeon.so
-%{_datadir}/vulkan/icd.d/radeon_icd.*.json
%endif
%ifarch %{ix86} %{x86_64}
@@ -885,21 +936,19 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%files -n %{dridrivers}-intel
%{_libdir}/dri/i9?5_dri.so
-%if %{with opencl}
%{_libdir}/libvulkan_intel.so
%{_datadir}/vulkan/icd.d/intel_icd.*.json
%endif
-%endif
%files -n %{dridrivers}-nouveau
%{_libdir}/dri/nouveau*_dri.so
+%{_libdir}/libXvMCnouveau.so
%if %{with va}
%{_libdir}/dri/nouveau_drv_video.so
%endif
%if %{with opencl}
%{_libdir}/gallium-pipe/pipe_nouveau.so
%endif
-%{_libdir}/libXvMCnouveau.so
%files -n %{dridrivers}-swrast
%{_libdir}/dri/swrast_dri.so
@@ -917,6 +966,7 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%{_libdir}/dri/msm_dri.so
%if %{with opencl}
%{_libdir}/gallium-pipe/pipe_msm.so
+%endif
%files -n %{dridrivers}-vc4
%{_libdir}/dri/vc4_dri.so
@@ -930,11 +980,26 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%files -n %{dridrivers}-tegra
%{_libdir}/dri/tegra_dri.so
+%files -n %{dridrivers}-lima
+%{_libdir}/dri/lima_dri.so
+
+%files -n %{dridrivers}-panfrost
+%{_libdir}/dri/panfrost_dri.so
+
%files -n %{dridrivers}-kmsro
-%{_libdir}/dri/pl111_dri.so
+%{_libdir}/dri/armada-drm_dri.so
+%{_libdir}/dri/exynos_dri.so
%{_libdir}/dri/hx8357d_dri.so
+%{_libdir}/dri/ili9???_dri.so
%{_libdir}/dri/imx-drm_dri.so
-%endif
+%{_libdir}/dri/meson_dri.so
+%{_libdir}/dri/mi0283qt_dri.so
+%{_libdir}/dri/pl111_dri.so
+%{_libdir}/dri/repaper_dri.so
+%{_libdir}/dri/rockchip_dri.so
+%{_libdir}/dri/st7586_dri.so
+%{_libdir}/dri/st7735r_dri.so
+%{_libdir}/dri/sun4i-drm_dri.so
%endif
%files -n %{libosmesa}
@@ -947,7 +1012,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%{_libdir}/pkgconfig/osmesa.pc
%files -n %{libgl}
+%if %{with glvnd}
%{_datadir}/glvnd/egl_vendor.d/50_mesa.json
+%endif
%{_libdir}/libGLX_mesa.so.0*
%dir %{_libdir}/dri
%if %{with opencl}
@@ -1094,7 +1161,7 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc
%{_libexecdir}/libintel_dump_gpu.so
%{_libexecdir}/libintel_sanitize_gpu.so
%endif
-%ifarch %{arm} %{armx}
+%ifarch %{armx}
%{_bindir}/etnaviv_compiler
%{_bindir}/ir3_compiler
%endif
diff --git a/riscv64.patch b/riscv64.patch
new file mode 100644
index 0000000..81e1b1f
--- /dev/null
+++ b/riscv64.patch
@@ -0,0 +1,32 @@
+diff -up mesa-19.1.0-rc5/meson.build.6~ mesa-19.1.0-rc5/meson.build
+--- mesa-19.1.0-rc5/meson.build.6~ 2019-06-08 17:32:01.123490981 +0200
++++ mesa-19.1.0-rc5/meson.build 2019-06-08 17:39:22.799495469 +0200
+@@ -115,7 +115,7 @@ if dri_drivers.contains('auto')
+ # TODO: PPC, Sparc
+ if ['x86', 'x86_64'].contains(host_machine.cpu_family())
+ dri_drivers = ['i915', 'i965', 'r100', 'r200', 'nouveau']
+- elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
++ elif ['arm', 'aarch64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
+ dri_drivers = ['r100', 'r200', 'nouveau']
+ else
+ error('Unknown architecture @0@. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+@@ -153,6 +153,10 @@ if gallium_drivers.contains('auto')
+ 'r600', 'radeonsi', 'nouveau',
+ 'tegra', 'panfrost', 'virgl', 'lima', 'swrast'
+ ]
++ elif ['riscv32', 'riscv64'].contains(host_machine.cpu_family())
++ gallium_drivers = [
++ 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'swrast'
++ ]
+ else
+ error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+ host_machine.cpu_family()))
+@@ -206,7 +210,7 @@ if _vulkan_drivers.contains('auto')
+ if system_has_kms_drm
+ if host_machine.cpu_family().startswith('x86')
+ _vulkan_drivers = ['amd', 'intel']
+- elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
++ elif ['arm', 'aarch64', 'riscv64'].contains(host_machine.cpu_family())
+ _vulkan_drivers = ['amd']
+ else
+ error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(