$ git diff --patch-with-stat --summary 1924b49d06f7a1c9df59ea2711cb8dd73b1ce5a0..70e91f7906c44de6313f947bdb0a2daa41b20ffe
.abf.yml | 2 +-
libmesautil-supc++-linkage.patch | 7 +-
mesa-18.1.0-fix-build-with-latest-llvm.patch | 40 +++++++++
mesa-18.1.0-rc1-swr-llvm-7.0.patch | 119 +++++++++++++++++++++++++++
mesa-18.1.3-llvm-7.0.patch | 45 ++++++++++
mesa.spec | 98 +++++++++-------------
6 files changed, 247 insertions(+), 64 deletions(-)
create mode 100644 mesa-18.1.0-fix-build-with-latest-llvm.patch
create mode 100644 mesa-18.1.0-rc1-swr-llvm-7.0.patch
create mode 100644 mesa-18.1.3-llvm-7.0.patch
diff --git a/.abf.yml b/.abf.yml
index 5d54755..574b8e2 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- mesa-17.3.9.tar.xz: b6c6983acec4b5b7ab0802dedc74efa09dc37b5d
+ mesa-18.1.3.tar.xz: 0a5fb3096108a95f913411267b8a374f9ff547b2
diff --git a/libmesautil-supc++-linkage.patch b/libmesautil-supc++-linkage.patch
index 42b3a0d..85eff41 100644
--- a/libmesautil-supc++-linkage.patch
+++ b/libmesautil-supc++-linkage.patch
@@ -1,7 +1,6 @@
-diff -Naur mesa-17.3.6/src/util/Makefile.am mesa-17.3.6.tpg/src/util/Makefile.am
---- mesa-17.3.6/src/util/Makefile.am 2018-02-27 00:21:09.000000000 +0000
-+++ mesa-17.3.6.tpg/src/util/Makefile.am 2018-03-02 18:03:23.089572671 +0000
-@@ -54,7 +54,7 @@
+--- mesa-18.0.0-rc2/src/util/Makefile.am.0002~ 2018-01-24 09:23:04.056094031 +0100
++++ mesa-18.0.0-rc2/src/util/Makefile.am 2018-01-24 09:25:24.085422816 +0100
+@@ -54,7 +54,7 @@ libmesautil_la_LIBADD = \
$(PTHREAD_LIBS) \
$(CLOCK_LIB) \
$(ZLIB_LIBS) \
diff --git a/mesa-18.1.0-fix-build-with-latest-llvm.patch b/mesa-18.1.0-fix-build-with-latest-llvm.patch
new file mode 100644
index 0000000..9ceabc6
--- /dev/null
+++ b/mesa-18.1.0-fix-build-with-latest-llvm.patch
@@ -0,0 +1,40 @@
+diff -up mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp.omv~ mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp
+--- mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp.omv~ 2018-05-24 01:07:11.220728010 +0200
++++ mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp 2018-05-24 01:08:34.191732290 +0200
+@@ -122,12 +122,9 @@ namespace SwrJit
+ },
+ { // AVX512
+ {"meta.intrinsic.VRCPPS", {{Intrinsic::x86_avx512_rcp14_ps_256, Intrinsic::x86_avx512_rcp14_ps_512}, NO_EMU}},
+- {"meta.intrinsic.VPERMPS", {{Intrinsic::x86_avx512_mask_permvar_sf_256, Intrinsic::x86_avx512_mask_permvar_sf_512}, NO_EMU}},
+- {"meta.intrinsic.VPERMD", {{Intrinsic::x86_avx512_mask_permvar_si_256, Intrinsic::x86_avx512_mask_permvar_si_512}, NO_EMU}},
+ {"meta.intrinsic.VGATHERPD", {{Intrinsic::not_intrinsic, Intrinsic::not_intrinsic}, VGATHER_EMU}},
+ {"meta.intrinsic.VGATHERPS", {{Intrinsic::not_intrinsic, Intrinsic::not_intrinsic}, VGATHER_EMU}},
+ {"meta.intrinsic.VGATHERDD", {{Intrinsic::not_intrinsic, Intrinsic::not_intrinsic}, VGATHER_EMU}},
+- {"meta.intrinsic.VCVTPD2PS", {{Intrinsic::x86_avx512_mask_cvtpd2ps_256, Intrinsic::x86_avx512_mask_cvtpd2ps_512 }, NO_EMU}},
+ {"meta.intrinsic.VCVTPH2PS", {{Intrinsic::x86_avx512_mask_vcvtph2ps_256, Intrinsic::x86_avx512_mask_vcvtph2ps_512 }, NO_EMU}},
+ {"meta.intrinsic.VROUND", {{Intrinsic::not_intrinsic, Intrinsic::not_intrinsic}, VROUND_EMU}},
+ {"meta.intrinsic.VHSUBPS", {{Intrinsic::not_intrinsic, Intrinsic::not_intrinsic}, VHSUB_EMU}},
+diff -up mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp.omv~ mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+--- mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp.omv~ 2018-05-24 00:50:25.045676102 +0200
++++ mesa-18.1.0/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp 2018-05-24 00:51:49.927680481 +0200
+@@ -329,7 +329,7 @@ void JitManager::DumpAsm(Function* pFunc
+ legacy::PassManager* pMPasses = new legacy::PassManager();
+ auto* pTarget = mpExec->getTargetMachine();
+ pTarget->Options.MCOptions.AsmVerbose = true;
+- pTarget->addPassesToEmitFile(*pMPasses, filestream, TargetMachine::CGFT_AssemblyFile);
++ pTarget->addPassesToEmitFile(*pMPasses, filestream, nullptr, TargetMachine::CGFT_AssemblyFile);
+ pMPasses->run(*pModule);
+ delete pMPasses;
+ pTarget->Options.MCOptions.AsmVerbose = false;
+diff -up mesa-18.1.0/src/gallium/state_trackers/clover/llvm/codegen/native.cpp.omv~ mesa-18.1.0/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
+--- mesa-18.1.0/src/gallium/state_trackers/clover/llvm/codegen/native.cpp.omv~ 2018-05-24 01:19:08.131764995 +0200
++++ mesa-18.1.0/src/gallium/state_trackers/clover/llvm/codegen/native.cpp 2018-05-24 01:19:16.175765410 +0200
+@@ -132,7 +132,7 @@ namespace {
+ tm->Options.MCOptions.AsmVerbose =
+ (ft == TargetMachine::CGFT_AssemblyFile);
+
+- if (tm->addPassesToEmitFile(pm, fos, ft))
++ if (tm->addPassesToEmitFile(pm, fos, nullptr, ft))
+ fail(r_log, build_error(), "TargetMachine can't emit this file");
+
+ pm.run(mod);
diff --git a/mesa-18.1.0-rc1-swr-llvm-7.0.patch b/mesa-18.1.0-rc1-swr-llvm-7.0.patch
new file mode 100644
index 0000000..863bc5d
--- /dev/null
+++ b/mesa-18.1.0-rc1-swr-llvm-7.0.patch
@@ -0,0 +1,119 @@
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
+--- mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp.omv~ 2018-04-26 12:40:16.517739232 +0200
++++ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp 2018-04-26 12:47:02.208398587 +0200
+@@ -33,6 +33,12 @@
+ #include "blend_jit.h"
+ #include "gen_state_llvm.h"
+ #include "functionpasses/passes.h"
++#if LLVM_VERSION_MAJOR >= 7
++#ifdef NDEBUG
++#define DEBUG(x)
++#endif
++#include <llvm/Transforms/InstCombine/InstCombine.h>
++#endif
+
+ // components with bit-widths <= the QUANTIZE_THRESHOLD will be quantized
+ #define QUANTIZE_THRESHOLD 2
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/builder.h.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/builder.h
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+--- mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp.omv~ 2018-04-26 12:45:15.299823237 +0200
++++ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp 2018-04-26 12:46:50.544658687 +0200
+@@ -33,6 +33,12 @@
+ #include "fetch_jit.h"
+ #include "gen_state_llvm.h"
+ #include "functionpasses/passes.h"
++#if LLVM_VERSION_MAJOR >= 7
++#ifdef NDEBUG
++#define DEBUG(x)
++#endif
++#include <llvm/Transforms/InstCombine/InstCombine.h>
++#endif
+
+ //#define FETCH_DUMP_VERTEX 1
+ using namespace llvm;
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/passes.h
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp
+--- mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp.omv~ 2018-04-26 12:32:49.452069747 +0200
++++ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp 2018-04-26 12:47:43.732470979 +0200
+@@ -57,22 +57,38 @@ CallInst* MEMSET(Value *Ptr, Value *Val,
+
+ CallInst* MEMCOPY(Value *Dst, Value *Src, uint64_t Size, unsigned Align, bool isVolatile = false, MDNode *TBAATag = nullptr, MDNode *TBAAStructTag = nullptr, MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr)
+ {
++#if LLVM_VERSION_MAJOR < 7
+ return IRB()->CreateMemCpy(Dst, Src, Size, Align, isVolatile, TBAATag, TBAAStructTag, ScopeTag, NoAliasTag);
++#else
++ return IRB()->CreateMemCpy(Dst, Align, Src, Align, Size, isVolatile, TBAATag, TBAAStructTag, ScopeTag, NoAliasTag);
++#endif
+ }
+
+ CallInst* MEMCOPY(Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile = false, MDNode *TBAATag = nullptr, MDNode *TBAAStructTag = nullptr, MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr)
+ {
++#if LLVM_VERSION_MAJOR < 7
+ return IRB()->CreateMemCpy(Dst, Src, Size, Align, isVolatile, TBAATag, TBAAStructTag, ScopeTag, NoAliasTag);
++#else
++ return IRB()->CreateMemCpy(Dst, Align, Src, Align, Size, isVolatile, TBAATag, TBAAStructTag, ScopeTag, NoAliasTag);
++#endif
+ }
+
+ CallInst* MEMMOVE(Value *Dst, Value *Src, uint64_t Size, unsigned Align, bool isVolatile = false, MDNode *TBAATag = nullptr, MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr)
+ {
++#if LLVM_VERSION_MAJOR < 7
+ return IRB()->CreateMemMove(Dst, Src, Size, Align, isVolatile, TBAATag, ScopeTag, NoAliasTag);
++#else
++ return IRB()->CreateMemMove(Dst, Align, Src, Align, Size, isVolatile, TBAATag, ScopeTag, NoAliasTag);
++#endif
+ }
+
+ CallInst* MEMMOVE(Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile = false, MDNode *TBAATag = nullptr, MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr)
+ {
++#if LLVM_VERSION_MAJOR < 7
+ return IRB()->CreateMemMove(Dst, Src, Size, Align, isVolatile, TBAATag, ScopeTag, NoAliasTag);
++#else
++ return IRB()->CreateMemMove(Dst, Align, Src, Align, Size, isVolatile, TBAATag, ScopeTag, NoAliasTag);
++#endif
+ }
+
+ CallInst* LIFETIME_START(Value *Ptr, ConstantInt *Size = nullptr)
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+--- mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp.omv~ 2018-04-26 12:46:04.947673493 +0200
++++ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp 2018-04-26 12:46:36.447972763 +0200
+@@ -509,7 +509,11 @@ static inline uint32_t ComputeModuleCRC(
+ std::string bitcodeBuffer;
+ raw_string_ostream bitcodeStream(bitcodeBuffer);
+
++#if LLVM_VERSION_MAJOR >= 7
++ llvm::WriteBitcodeToFile(*M, bitcodeStream);
++#else
+ llvm::WriteBitcodeToFile(M, bitcodeStream);
++#endif
+ //M->print(bitcodeStream, nullptr, false);
+
+ bitcodeStream.flush();
+diff -up mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp.omv~ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
+--- mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp.omv~ 2018-04-26 12:48:42.503154063 +0200
++++ mesa-18.1.0-rc1/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp 2018-04-26 12:48:47.952031743 +0200
+@@ -33,6 +33,12 @@
+ #include "streamout_jit.h"
+ #include "gen_state_llvm.h"
+ #include "functionpasses/passes.h"
++#if LLVM_VERSION_MAJOR >= 7
++#ifdef NDEBUG
++#define DEBUG(x)
++#endif
++#include <llvm/Transforms/InstCombine/InstCombine.h>
++#endif
+
+ using namespace llvm;
+ using namespace SwrJit;
+diff -up mesa-18.1.0-rc4/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp.omv~ mesa-18.1.0-rc4/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp
+--- mesa-18.1.0-rc4/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp.omv~ 2018-05-14 12:03:39.808374700 +0200
++++ mesa-18.1.0-rc4/src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp 2018-05-14 12:03:54.228045023 +0200
+@@ -918,7 +918,7 @@ Value* PTR_DIFF(Value *LHS, Value *RHS,
+
+ Value* INVARIANT_GROUP_BARRIER(Value *Ptr)
+ {
+- return IRB()->CreateInvariantGroupBarrier(Ptr);
++ return IRB()->CreateLaunderInvariantGroup(Ptr);
+ }
+
+ Value* VECTOR_SPLAT(unsigned NumElts, Value *V, const Twine &Name = "")
diff --git a/mesa-18.1.3-llvm-7.0.patch b/mesa-18.1.3-llvm-7.0.patch
new file mode 100644
index 0000000..1694dbf
--- /dev/null
+++ b/mesa-18.1.3-llvm-7.0.patch
@@ -0,0 +1,45 @@
+diff -up mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp.omv~ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
+--- mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp.omv~ 2018-07-07 00:47:53.711069107 +0200
++++ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp 2018-07-07 00:49:54.418073608 +0200
+@@ -822,7 +822,6 @@ struct BlendJit : public Builder
+ passes.add(createCFGSimplificationPass());
+ passes.add(createEarlyCSEPass());
+ passes.add(createInstructionCombiningPass());
+- passes.add(createInstructionSimplifierPass());
+ passes.add(createConstantPropagationPass());
+ passes.add(createSCCPPass());
+ passes.add(createAggressiveDCEPass());
+diff -up mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp.omv~ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+--- mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp.omv~ 2018-07-07 00:51:09.774076418 +0200
++++ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp 2018-07-07 00:51:16.786076680 +0200
+@@ -268,7 +268,6 @@ Function* FetchJit::Create(const FETCH_C
+ optPasses.add(createCFGSimplificationPass());
+ optPasses.add(createEarlyCSEPass());
+ optPasses.add(createInstructionCombiningPass());
+- optPasses.add(createInstructionSimplifierPass());
+ optPasses.add(createConstantPropagationPass());
+ optPasses.add(createSCCPPass());
+ optPasses.add(createAggressiveDCEPass());
+diff -up mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp.omv~ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp
+--- mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp.omv~ 2018-07-07 00:55:09.807085369 +0200
++++ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/functionpasses/lower_x86.cpp 2018-07-07 00:57:38.594090918 +0200
+@@ -77,7 +77,7 @@ namespace SwrJit
+ {"meta.intrinsic.VCVTPS2PH", Intrinsic::x86_vcvtps2ph_256},
+ {"meta.intrinsic.VPTESTC", Intrinsic::x86_avx_ptestc_256},
+ {"meta.intrinsic.VPTESTZ", Intrinsic::x86_avx_ptestz_256},
+- {"meta.intrinsic.VFMADDPS", Intrinsic::x86_fma_vfmadd_ps_256},
++ {"meta.intrinsic.VFMADDPS", Intrinsic::fma},
+ {"meta.intrinsic.VPHADDD", Intrinsic::x86_avx2_phadd_d},
+ {"meta.intrinsic.PDEP32", Intrinsic::x86_bmi_pdep_32},
+ {"meta.intrinsic.RDTSC", Intrinsic::x86_rdtsc},
+diff -up mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp.omv~ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
+--- mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp.omv~ 2018-07-07 00:51:01.733076119 +0200
++++ mesa-18.1.3/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp 2018-07-07 00:51:05.330076253 +0200
+@@ -308,7 +308,6 @@ struct StreamOutJit : public Builder
+ passes.add(createCFGSimplificationPass());
+ passes.add(createEarlyCSEPass());
+ passes.add(createInstructionCombiningPass());
+- passes.add(createInstructionSimplifierPass());
+ passes.add(createConstantPropagationPass());
+ passes.add(createSCCPPass());
+ passes.add(createAggressiveDCEPass());
diff --git a/mesa.spec b/mesa.spec
index 039c086..96c4750 100644
--- a/mesa.spec
+++ b/mesa.spec
@@ -33,7 +33,6 @@
%bcond_with bootstrap
%bcond_without vdpau
%bcond_without va
-%bcond_without wayland
%bcond_without egl
%bcond_without opencl
%ifarch %arm mips sparc aarch64
@@ -115,11 +114,6 @@
%define libcl %mklibname %clname %clmajor
%define devcl %mklibname %clname -d
-%define waylandeglmajor 1
-%define waylandeglname wayland-egl
-%define libwaylandegl %mklibname %{waylandeglname} %{waylandeglmajor}
-%define devwaylandegl %mklibname %{waylandeglname} -d
-
%define mesasrcdir %{_prefix}/src/Mesa/
%define driver_dir %{_libdir}/dri
@@ -153,7 +147,7 @@
Summary: OpenGL %{opengl_ver} compatible 3D graphics library
Name: mesa
-Version: 17.3.9
+Version: 18.1.3
%if "%{relc}%{git}" == ""
Release: 1
%else
@@ -273,11 +267,6 @@ BuildRequires: pkgconfig(vdpau) >= 0.4.1
%if %{with va}
BuildRequires: pkgconfig(libva) >= 0.31.0
%endif
-%if %{with wayland}
-BuildRequires: pkgconfig(wayland-client)
-BuildRequires: pkgconfig(wayland-server)
-BuildRequires: pkgconfig(wayland-protocols) >= 1.8
-%endif
# package mesa
Requires: libGL.so.%{glmajor}%{_arch_tag_suffix}
@@ -606,6 +595,13 @@ This package contains the headers needed to compile Direct3D 9 programs.
%package -n %{libcl}
Summary: OpenCL libs
Group: System/Libraries
+%define libmesacl %mklibname mesaopencl %clmajor
+Provides: %{libmesacl} = %{EVRD}
+%if "%{_lib}" == "lib64"
+Provides: libOpenCL.so.1()(64bit)
+%else
+Provides: libOpenCL.so.1
+%endif
%description -n %{libcl}
Open Computing Language (OpenCL) is a framework for writing programs that
@@ -713,25 +709,6 @@ Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
GBM (Graphics Buffer Manager) development parts.
%endif
-%if %{with wayland}
-%package -n %{libwaylandegl}
-Summary: Files for Mesa (Wayland EGL libs)
-Group: System/Libraries
-
-%description -n %{libwaylandegl}
-Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
-Wayland EGL platform parts.
-
-%package -n %{devwaylandegl}
-Summary: Development files for Mesa (Wayland EGL libs)
-Group: Development/C
-Requires: %{libwaylandegl} = %{version}-%{release}
-
-%description -n %{devwaylandegl}
-Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library.
-Wayland EGL platform development parts.
-%endif
-
%package common-devel
Summary: Meta package for mesa devel
Group: Development/C
@@ -794,12 +771,6 @@ GALLIUM_DRIVERS="$GALLIUM_DRIVERS,r600,radeonsi"
%ifarch %{ix86} x86_64
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,svga,swr"
%endif
-%if %{with intel}
-# (tpg) i915 got removed as it does not load on wayland
-# http://wayland.freedesktop.org/building.html
-# ilo is gone as of 17.1-rc1
-# GALLIUM_DRIVERS="$GALLIUM_DRIVERS,ilo"
-%endif
%ifarch %{armx}
GALLIUM_DRIVERS="$GALLIUM_DRIVERS,freedreno,vc4,etnaviv,pl111,imx"
%endif
@@ -821,11 +792,7 @@ GALLIUM_DRIVERS="$GALLIUM_DRIVERS,freedreno,vc4,etnaviv,pl111,imx"
%else
--disable-egl \
%endif
-%if %{with wayland}
- --with-platforms=x11,drm,wayland,surfaceless \
-%else
--with-platforms=x11,drm,surfaceless \
-%endif
--enable-gles1 \
--enable-gles2 \
%if %{with opencl}
@@ -862,7 +829,7 @@ GALLIUM_DRIVERS="$GALLIUM_DRIVERS,freedreno,vc4,etnaviv,pl111,imx"
# See e.g. https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1066599
# -Anssi 12/2012
-cd build-osmesa
+pushd build-osmesa
%configure \
--enable-gallium-osmesa \
--disable-dri \
@@ -872,8 +839,13 @@ cd build-osmesa
--disable-shared-glapi \
--disable-gles1 \
--disable-gles2 \
+%ifarch %{ix86} x86_64 aarch64
+ --enable-llvm \
--with-gallium-drivers=swr,swrast
-cd -
+%else
+ --with-gallium-drivers=swrast
+%endif
+popd
%make
%ifarch i686
@@ -911,22 +883,34 @@ mkdir -p %{buildroot}%{_prefix}/lib/dri
# FIXME workaround for Vulkan headers not being installed
if [ -e %{buildroot}%{_includedir}/vulkan/vulkan.h ]; then
- echo Vulkan headers are being installed correctly now. Please remove the workaround.
- exit 1
+ echo Vulkan headers are being installed correctly now. Please remove the workaround.
+ exit 1
else
- mkdir -p %{buildroot}%{_includedir}/vulkan
- cp -af include/vulkan/* %{buildroot}%{_includedir}/vulkan/
+ mkdir -p %{buildroot}%{_includedir}/vulkan
+ cp -af include/vulkan/* %{buildroot}%{_includedir}/vulkan/
%ifnarch %{ix86} x86_64
- rm -f %{buildroot}%{_includedir}/vulkan/vulkan_intel.h
+ rm -f %{buildroot}%{_includedir}/vulkan/vulkan_intel.h
%endif
fi
+# 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.
+ exit 1
+else
+ cp -af include/CL %{buildroot}%{_includedir}/
+fi
+
# .so files are not needed by vdpau
rm -f %{buildroot}%{_libdir}/vdpau/libvdpau_*.so
# .la files are not needed by mesa
find %{buildroot} -name '*.la' |xargs rm -f
+# For compatibility...
+ln -s libMesaOpenCL.so.1 %{buildroot}%{_libdir}/libOpenCL.so.1
+ln -s libOpenCL.so.1 %{buildroot}%{_libdir}/libOpenCL.so
+
# use swrastg if built (Anssi 12/2011)
[ -e %{buildroot}%{_libdir}/dri/swrastg_dri.so ] && mv %{buildroot}%{_libdir}/dri/swrast{g,}_dri.so
@@ -944,10 +928,14 @@ find %{buildroot} -name '*.la' |xargs rm -f
%{_libdir}/gallium-pipe/pipe_r?00.so
%endif
%if %{with r600}
+%if %{with va}
%{_libdir}/dri/r600_drv_video.so
+%endif
%{_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
@@ -1066,6 +1054,8 @@ find %{buildroot} -name '*.la' |xargs rm -f
%if %{with opencl}
%files -n %{libcl}
+%{_sysconfdir}/OpenCL
+%{_libdir}/libMesaOpenCL.so.%{clmajor}*
%{_libdir}/libOpenCL.so.%{clmajor}*
%endif
@@ -1074,11 +1064,6 @@ find %{buildroot} -name '*.la' |xargs rm -f
%{_libdir}/libgbm.so.%{gbmmajor}*
%endif
-%if %{with wayland}
-%files -n %{libwaylandegl}
-%{_libdir}/libwayland-egl.so.%{waylandeglmajor}*
-%endif
-
%files -n %{devgl}
%dir %{_includedir}/GL
%{_includedir}/GL/gl.h
@@ -1161,6 +1146,7 @@ find %{buildroot} -name '*.la' |xargs rm -f
%files -n %{devcl}
%{_includedir}/CL
%{_libdir}/libOpenCL.so
+%{_libdir}/libMesaOpenCL.so
%endif
%if %{with egl}
@@ -1170,12 +1156,6 @@ find %{buildroot} -name '*.la' |xargs rm -f
%{_libdir}/pkgconfig/gbm.pc
%endif
-%if %{with wayland}
-%files -n %{devwaylandegl}
-%{_libdir}/libwayland-egl.so
-%{_libdir}/pkgconfig/wayland-egl.pc
-%endif
-
%files -n %{devvulkan}
%{_includedir}/vulkan
%dir %{_datadir}/vulkan