Browse Source

mesa package update

Signed-off-by: guibuilder_pel7ppc64lebuilder0 <guibuilder@powerel.org>
master
guibuilder_pel7ppc64lebuilder0 5 years ago
parent
commit
352d1f8985
  1. 74
      SOURCES/mesa-10.2-evergreen-big-endian.patch
  2. 278
      SPECS/mesa.spec

74
SOURCES/mesa-10.2-evergreen-big-endian.patch

@ -1,7 +1,8 @@
diff -up mesa-20160225/src/gallium/drivers/r600/evergreen_state.c.egbe mesa-20160225/src/gallium/drivers/r600/evergreen_state.c diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
--- mesa-20160225/src/gallium/drivers/r600/evergreen_state.c.egbe 2016-02-22 21:42:41.000000000 +1000 index f0d4503..c617425 100644
+++ mesa-20160225/src/gallium/drivers/r600/evergreen_state.c 2016-02-25 13:06:47.351154059 +1000 --- a/src/gallium/drivers/r600/evergreen_state.c
@@ -219,7 +219,7 @@ static bool r600_is_sampler_format_suppo +++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -219,7 +219,7 @@ static bool r600_is_sampler_format_supported(struct pipe_screen *screen, enum pi
static bool r600_is_colorbuffer_format_supported(enum chip_class chip, enum pipe_format format) static bool r600_is_colorbuffer_format_supported(enum chip_class chip, enum pipe_format format)
{ {
return r600_translate_colorformat(chip, format) != ~0U && return r600_translate_colorformat(chip, format) != ~0U &&
@ -10,7 +11,7 @@ diff -up mesa-20160225/src/gallium/drivers/r600/evergreen_state.c.egbe mesa-2016
} }
static bool r600_is_zs_format_supported(enum pipe_format format) static bool r600_is_zs_format_supported(enum pipe_format format)
@@ -982,7 +982,8 @@ void evergreen_init_color_surface_rat(st @@ -918,7 +918,8 @@ void evergreen_init_color_surface_rat(struct r600_context *rctx,
unsigned format = r600_translate_colorformat(rctx->b.chip_class, unsigned format = r600_translate_colorformat(rctx->b.chip_class,
surf->base.format); surf->base.format);
unsigned endian = r600_colorformat_endian_swap(format); unsigned endian = r600_colorformat_endian_swap(format);
@ -20,7 +21,7 @@ diff -up mesa-20160225/src/gallium/drivers/r600/evergreen_state.c.egbe mesa-2016
unsigned block_size = unsigned block_size =
align(util_format_get_blocksize(pipe_buffer->format), 4); align(util_format_get_blocksize(pipe_buffer->format), 4);
unsigned pitch_alignment = unsigned pitch_alignment =
@@ -1143,7 +1144,7 @@ void evergreen_init_color_surface(struct @@ -1078,7 +1079,7 @@ void evergreen_init_color_surface(struct r600_context *rctx,
format = r600_translate_colorformat(rctx->b.chip_class, surf->base.format); format = r600_translate_colorformat(rctx->b.chip_class, surf->base.format);
assert(format != ~0); assert(format != ~0);
@ -29,10 +30,11 @@ diff -up mesa-20160225/src/gallium/drivers/r600/evergreen_state.c.egbe mesa-2016
assert(swap != ~0); assert(swap != ~0);
if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) { if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
diff -up mesa-20160225/src/gallium/drivers/r600/r600_state.c.egbe mesa-20160225/src/gallium/drivers/r600/r600_state.c diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
--- mesa-20160225/src/gallium/drivers/r600/r600_state.c.egbe 2016-02-22 21:42:41.000000000 +1000 index dd2e423..190fdfc 100644
+++ mesa-20160225/src/gallium/drivers/r600/r600_state.c 2016-02-25 13:06:47.351154059 +1000 --- a/src/gallium/drivers/r600/r600_state.c
@@ -149,7 +149,7 @@ static bool r600_is_sampler_format_suppo +++ b/src/gallium/drivers/r600/r600_state.c
@@ -149,7 +149,7 @@ static bool r600_is_sampler_format_supported(struct pipe_screen *screen, enum pi
static bool r600_is_colorbuffer_format_supported(enum chip_class chip, enum pipe_format format) static bool r600_is_colorbuffer_format_supported(enum chip_class chip, enum pipe_format format)
{ {
return r600_translate_colorformat(chip, format) != ~0U && return r600_translate_colorformat(chip, format) != ~0U &&
@ -41,7 +43,7 @@ diff -up mesa-20160225/src/gallium/drivers/r600/r600_state.c.egbe mesa-20160225/
} }
static bool r600_is_zs_format_supported(enum pipe_format format) static bool r600_is_zs_format_supported(enum pipe_format format)
@@ -927,7 +927,7 @@ static void r600_init_color_surface(stru @@ -899,7 +899,7 @@ static void r600_init_color_surface(struct r600_context *rctx,
format = r600_translate_colorformat(rctx->b.chip_class, surf->base.format); format = r600_translate_colorformat(rctx->b.chip_class, surf->base.format);
assert(format != ~0); assert(format != ~0);
@ -50,10 +52,11 @@ diff -up mesa-20160225/src/gallium/drivers/r600/r600_state.c.egbe mesa-20160225/
assert(swap != ~0); assert(swap != ~0);
if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) { if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
diff -up mesa-20160225/src/gallium/drivers/r600/r600_state_common.c.egbe mesa-20160225/src/gallium/drivers/r600/r600_state_common.c diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
--- mesa-20160225/src/gallium/drivers/r600/r600_state_common.c.egbe 2016-02-22 21:42:41.000000000 +1000 index fabc52c..c276016 100644
+++ mesa-20160225/src/gallium/drivers/r600/r600_state_common.c 2016-02-25 13:06:47.352154086 +1000 --- a/src/gallium/drivers/r600/r600_state_common.c
@@ -2704,7 +2704,7 @@ uint32_t r600_translate_colorformat(enum +++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2258,7 +2258,7 @@ uint32_t r600_translate_colorformat(enum chip_class chip, enum pipe_format forma
uint32_t r600_colorformat_endian_swap(uint32_t colorformat) uint32_t r600_colorformat_endian_swap(uint32_t colorformat)
{ {
@ -62,10 +65,11 @@ diff -up mesa-20160225/src/gallium/drivers/r600/r600_state_common.c.egbe mesa-20
switch(colorformat) { switch(colorformat) {
/* 8-bit buffers. */ /* 8-bit buffers. */
case V_0280A0_COLOR_4_4: case V_0280A0_COLOR_4_4:
diff -up mesa-20160225/src/gallium/drivers/radeon/r600_pipe_common.h.egbe mesa-20160225/src/gallium/drivers/radeon/r600_pipe_common.h diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
--- mesa-20160225/src/gallium/drivers/radeon/r600_pipe_common.h.egbe 2016-02-22 21:42:41.000000000 +1000 index e7f410d..9bb471a 100644
+++ mesa-20160225/src/gallium/drivers/radeon/r600_pipe_common.h 2016-02-25 13:06:47.352154086 +1000 --- a/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -576,7 +576,7 @@ struct pipe_surface *r600_create_surface +++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -457,7 +457,7 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
struct pipe_resource *texture, struct pipe_resource *texture,
const struct pipe_surface *templ, const struct pipe_surface *templ,
unsigned width, unsigned height); unsigned width, unsigned height);
@ -74,10 +78,11 @@ diff -up mesa-20160225/src/gallium/drivers/radeon/r600_pipe_common.h.egbe mesa-2
void evergreen_do_fast_color_clear(struct r600_common_context *rctx, void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
struct pipe_framebuffer_state *fb, struct pipe_framebuffer_state *fb,
struct r600_atom *fb_state, struct r600_atom *fb_state,
diff -up mesa-20160225/src/gallium/drivers/radeon/r600_texture.c.egbe mesa-20160225/src/gallium/drivers/radeon/r600_texture.c diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
--- mesa-20160225/src/gallium/drivers/radeon/r600_texture.c.egbe 2016-02-22 21:42:41.000000000 +1000 index 9a46c53..5022666 100644
+++ mesa-20160225/src/gallium/drivers/radeon/r600_texture.c 2016-02-25 13:07:22.903127421 +1000 --- a/src/gallium/drivers/radeon/r600_texture.c
@@ -1252,10 +1252,215 @@ static void r600_surface_destroy(struct +++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1157,10 +1157,215 @@ static void r600_surface_destroy(struct pipe_context *pipe,
FREE(surface); FREE(surface);
} }
@ -294,21 +299,22 @@ diff -up mesa-20160225/src/gallium/drivers/radeon/r600_texture.c.egbe mesa-20160
#define HAS_SWIZZLE(chan,swz) (desc->swizzle[chan] == UTIL_FORMAT_SWIZZLE_##swz) #define HAS_SWIZZLE(chan,swz) (desc->swizzle[chan] == UTIL_FORMAT_SWIZZLE_##swz)
if (format == PIPE_FORMAT_R11G11B10_FLOAT) /* isn't plain */ if (format == PIPE_FORMAT_R11G11B10_FLOAT) /* isn't plain */
@@ -1411,6 +1616,10 @@ void evergreen_do_fast_color_clear(struc @@ -1238,6 +1443,10 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
if (rctx->render_cond) {
return; int i;
+#ifdef PIPE_ARCH_BIG_ENDIAN +#ifdef PIPE_ARCH_BIG_ENDIAN
+ return false; /* broken; overkill to just disable them, but */ + return false; /* broken; overkill to just disable them, but */
+#endif +#endif
+ +
for (i = 0; i < fb->nr_cbufs; i++) { if (rctx->current_render_cond)
struct r600_texture *tex; return;
unsigned clear_bit = PIPE_CLEAR_COLOR0 << i;
diff -up mesa-20160225/src/gallium/drivers/radeonsi/si_state.c.egbe mesa-20160225/src/gallium/drivers/radeonsi/si_state.c diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
--- mesa-20160225/src/gallium/drivers/radeonsi/si_state.c.egbe 2016-02-22 21:42:41.000000000 +1000 index 7f65c47..f3976eb 100644
+++ mesa-20160225/src/gallium/drivers/radeonsi/si_state.c 2016-02-25 13:06:47.353154114 +1000 --- a/src/gallium/drivers/radeonsi/si_state.c
@@ -1966,7 +1966,7 @@ static bool si_is_vertex_format_supporte +++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1447,7 +1447,7 @@ static bool si_is_vertex_format_supported(struct pipe_screen *screen, enum pipe_
static bool si_is_colorbuffer_format_supported(enum pipe_format format) static bool si_is_colorbuffer_format_supported(enum pipe_format format)
{ {
return si_translate_colorformat(format) != V_028C70_COLOR_INVALID && return si_translate_colorformat(format) != V_028C70_COLOR_INVALID &&
@ -317,7 +323,7 @@ diff -up mesa-20160225/src/gallium/drivers/radeonsi/si_state.c.egbe mesa-2016022
} }
static bool si_is_zs_format_supported(enum pipe_format format) static bool si_is_zs_format_supported(enum pipe_format format)
@@ -2249,7 +2249,7 @@ static void si_initialize_color_surface( @@ -1615,7 +1615,7 @@ static void si_initialize_color_surface(struct si_context *sctx,
R600_ERR("Invalid CB format: %d, disabling CB.\n", surf->base.format); R600_ERR("Invalid CB format: %d, disabling CB.\n", surf->base.format);
} }
assert(format != V_028C70_COLOR_INVALID); assert(format != V_028C70_COLOR_INVALID);

278
SPECS/mesa.spec

@ -1,17 +1,16 @@
#%if 0%{?rhel} %if 0%{?rhel}
%define with_private_llvm 1 %define with_private_llvm 1
#%else %else
#%define with_private_llvm 0 %define with_private_llvm 0
#%endif

%define with_vdpau 1 %define with_vdpau 1
%define with_wayland 1 %define with_wayland 1
%endif


%ifnarch ppc %ifnarch ppc
%define with_radeonsi 1 %define with_radeonsi 1
%endif %endif


%ifarch %{arm} aarch64 %ifarch %{arm}
%define with_freedreno 1 %define with_freedreno 1
%endif %endif


@ -22,7 +21,7 @@
%define with_llvm 1 %define with_llvm 1
%endif %endif


%ifarch s390 s390x %ifarch s390 s390x aarch64
%define with_hardware 0 %define with_hardware 0
%ifarch s390 %ifarch s390
%define base_drivers swrast %define base_drivers swrast
@ -30,44 +29,32 @@
%else %else
%define with_hardware 1 %define with_hardware 1
%define base_drivers nouveau,radeon,r200 %define base_drivers nouveau,radeon,r200
%define base_vulkan_drivers radeon
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
%define platform_drivers ,i915,i965 %define platform_drivers ,i915,i965
%define with_vmware 1 %define with_vmware 1
%define platform_vulkan_drivers ,intel
%endif %endif
%ifarch ppc %ifarch ppc
%define platform_drivers ,swrast %define platform_drivers ,swrast
%endif %endif
%endif %endif


%ifarch x86_64 ppc64le
%define with_vulkan 1
%else
%define with_vulkan 0
%endif

%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} %define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers}


%if 0%{?with_vulkan}
%define vulkan_drivers --with-vulkan-drivers=%{?base_vulkan_drivers}%{?platform_vulkan_drivers}
%endif

%define _default_patch_fuzz 2 %define _default_patch_fuzz 2


#define gitdate 20180530 %define gitdate 20150824
#% define snapshot #% define snapshot


Summary: Mesa graphics libraries Summary: Mesa graphics libraries
Name: mesa Name: mesa
Version: 18.0.5 Version: 10.6.5
Release: 3%{?dist} Release: 3.%{gitdate}%{?dist}
License: MIT License: MIT
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.mesa3d.org URL: http://www.mesa3d.org


Source0: mesa-%{version}.tar.xz # Source0: MesaLib-%{version}.tar.xz
#Source0: %{name}-%{gitdate}.tar.xz Source0: %{name}-%{gitdate}.tar.xz
Source1: sanitize-tarball.sh Source1: sanitize-tarball.sh
Source2: make-release-tarball.sh Source2: make-release-tarball.sh
Source3: make-git-snapshot.sh Source3: make-git-snapshot.sh
@ -78,23 +65,19 @@ Source3: make-git-snapshot.sh
Source4: Mesa-MLAA-License-Clarification-Email.txt Source4: Mesa-MLAA-License-Clarification-Email.txt


Patch1: nv50-fix-build.patch Patch1: nv50-fix-build.patch
# backport of dri sw xshm support to help qxl Patch9: mesa-8.0-llvmpipe-shmget.patch
Patch2: dri-sw-xshm-support.patch

# fix some timeout mismatch warnings (backport from upstream)
Patch3: fix-timeout-warnings.patch
Patch12: mesa-8.0.1-fix-16bpp.patch Patch12: mesa-8.0.1-fix-16bpp.patch
Patch15: mesa-9.2-hardware-float.patch Patch15: mesa-9.2-hardware-float.patch
Patch20: mesa-10.2-evergreen-big-endian.patch Patch20: mesa-10.2-evergreen-big-endian.patch
Patch21: 0001-pkgconfig-Fix-gl.pc-when-glvnd-is-enabled.patch Patch25: mesa-10.6-llvmpipe-imm-fix-power.patch
Patch26: mesa-10.6-fix-texcompress-big-endian.patch


BuildRequires: pkgconfig autoconf automake libtool BuildRequires: pkgconfig autoconf automake libtool
%if %{with_hardware} %if %{with_hardware}
BuildRequires: kernel-headers BuildRequires: kernel-headers
BuildRequires: xorg-x11-server-devel BuildRequires: xorg-x11-server-devel
%endif %endif
BuildRequires: libatomic BuildRequires: libdrm-devel >= 2.4.60
BuildRequires: libdrm-devel >= 2.4.83
BuildRequires: libXxf86vm-devel BuildRequires: libXxf86vm-devel
BuildRequires: expat-devel BuildRequires: expat-devel
BuildRequires: xorg-x11-proto-devel BuildRequires: xorg-x11-proto-devel
@ -112,7 +95,7 @@ BuildRequires: python-mako
BuildRequires: gettext BuildRequires: gettext
%if 0%{?with_llvm} %if 0%{?with_llvm}
%if 0%{?with_private_llvm} %if 0%{?with_private_llvm}
BuildRequires: llvm-private-devel >= 6.0 BuildRequires: mesa-private-llvm-devel >= 3.6
%else %else
BuildRequires: llvm-devel >= 3.0 BuildRequires: llvm-devel >= 3.0
%endif %endif
@ -121,17 +104,15 @@ BuildRequires: elfutils-libelf-devel
BuildRequires: libxml2-python BuildRequires: libxml2-python
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: bison flex BuildRequires: bison flex
%if %{with wayland} %if !0%{?rhel}
BuildRequires: pkgconfig(wayland-client) >= 1.11 BuildRequires: pkgconfig(wayland-client) >= %{min_wayland_version}
BuildRequires: pkgconfig(wayland-server) >= 1.11 BuildRequires: pkgconfig(wayland-server) >= %{min_wayland_version}
BuildRequires: pkgconfig(wayland-protocols) >= 1.8.0
%endif %endif
# BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGL-devel
%if 0%{?with_vdpau} %if 0%{?with_vdpau}
BuildRequires: libvdpau-devel BuildRequires: libvdpau-devel
%endif %endif
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: libglvnd-devel


%description %description
Mesa Mesa
@ -141,8 +122,6 @@ Summary: Mesa libGL runtime libraries and DRI drivers
Group: System Environment/Libraries Group: System Environment/Libraries
Provides: libGL Provides: libGL
Requires: mesa-libglapi = %{version}-%{release} Requires: mesa-libglapi = %{version}-%{release}
Requires: libdrm >= 2.4.83
Requires: libglvnd-glx%{?_isa} >= 1:1.0.1-0.7


%description libGL %description libGL
Mesa libGL runtime library. Mesa libGL runtime library.
@ -151,7 +130,6 @@ Mesa libGL runtime library.
Summary: Mesa libEGL runtime libraries Summary: Mesa libEGL runtime libraries
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: mesa-libgbm = %{version}-%{release} Requires: mesa-libgbm = %{version}-%{release}
Requires: libglvnd-egl%{?_isa}


%description libEGL %description libEGL
Mesa libEGL runtime libraries Mesa libEGL runtime libraries
@ -160,7 +138,6 @@ Mesa libEGL runtime libraries
Summary: Mesa libGLES runtime libraries Summary: Mesa libGLES runtime libraries
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: mesa-libglapi = %{version}-%{release} Requires: mesa-libglapi = %{version}-%{release}
Requires: libglvnd-gles%{?_isa}


%description libGLES %description libGLES
Mesa GLES runtime libraries Mesa GLES runtime libraries
@ -177,7 +154,6 @@ Mesa driver filesystem
Summary: Mesa-based DRI drivers Summary: Mesa-based DRI drivers
Group: User Interface/X Hardware Support Group: User Interface/X Hardware Support
Requires: mesa-filesystem%{?_isa} Requires: mesa-filesystem%{?_isa}
Requires: libdrm >= 2.4.83
Obsoletes: mesa-dri1-drivers < 7.12 Obsoletes: mesa-dri1-drivers < 7.12
Obsoletes: mesa-dri-llvmcore <= 7.12 Obsoletes: mesa-dri-llvmcore <= 7.12
%description dri-drivers %description dri-drivers
@ -197,7 +173,6 @@ Summary: Mesa libGL development package
Group: Development/Libraries Group: Development/Libraries
Requires: mesa-libGL = %{version}-%{release} Requires: mesa-libGL = %{version}-%{release}
Requires: gl-manpages Requires: gl-manpages
Requires: libglvnd-devel%{?_isa}
Provides: libGL-devel Provides: libGL-devel


%description libGL-devel %description libGL-devel
@ -207,7 +182,6 @@ Mesa libGL development package
Summary: Mesa libEGL development package Summary: Mesa libEGL development package
Group: Development/Libraries Group: Development/Libraries
Requires: mesa-libEGL = %{version}-%{release} Requires: mesa-libEGL = %{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Provides: khrplatform-devel = %{version}-%{release} Provides: khrplatform-devel = %{version}-%{release}
Obsoletes: khrplatform-devel < %{version}-%{release} Obsoletes: khrplatform-devel < %{version}-%{release}


@ -218,7 +192,6 @@ Mesa libEGL development package
Summary: Mesa libGLES development package Summary: Mesa libGLES development package
Group: Development/Libraries Group: Development/Libraries
Requires: mesa-libGLES = %{version}-%{release} Requires: mesa-libGLES = %{version}-%{release}
Requires: libglvnd-devel%{?_isa}


%description libGLES-devel %description libGLES-devel
Mesa libGLES development package Mesa libGLES development package
@ -247,7 +220,6 @@ Mesa offscreen rendering development package
Summary: Mesa gbm library Summary: Mesa gbm library
Group: System Environment/Libraries Group: System Environment/Libraries
Provides: libgbm Provides: libgbm
Requires: libdrm >= 2.4.83
Requires: mesa-libglapi = %{version}-%{release} Requires: mesa-libglapi = %{version}-%{release}


%description libgbm %description libgbm
@ -264,7 +236,7 @@ Provides: libgbm-devel
Mesa libgbm development package Mesa libgbm development package




%if %{with wayland} %if !0%{?rhel}
%package libwayland-egl %package libwayland-egl
Summary: Mesa libwayland-egl library Summary: Mesa libwayland-egl library
Group: System Environment/Libraries Group: System Environment/Libraries
@ -311,33 +283,32 @@ Group: System Environment/Libraries
%description libglapi %description libglapi
Mesa shared glapi Mesa shared glapi


%if 0%{?with_vulkan}
%package vulkan-drivers
Summary: Mesa Vulkan drivers
Requires: vulkan%{_isa}

%description vulkan-drivers
The drivers with support for the Vulkan API.
%endif

%prep %prep
%setup -q -n mesa-%{version}%{?snapshot} #setup -q -n Mesa-%{version}%{?snapshot}
#setup -q -n mesa-%{gitdate} %setup -q -n mesa-%{gitdate}
# make sure you run sanitize-tarball.sh on mesa source tarball or next line will exit # make sure you run sanitize-tarball.sh on mesa source tarball or next line will exit
grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1 grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1
%patch1 -p1 -b .nv50rtti %patch1 -p1 -b .nv50rtti
%patch2 -p1 -b .xshm
%patch3 -p1 -b .timeout


# this fastpath is:
# - broken with swrast classic
# - broken on 24bpp
# - not a huge win anyway
# - ABI-broken wrt upstream
# - eventually obsoleted by vgem
#
# dear ajax: fix this one way or the other
#patch9 -p1 -b .shmget
#patch12 -p1 -b .16bpp #patch12 -p1 -b .16bpp


%patch15 -p1 -b .hwfloat %patch15 -p1 -b .hwfloat
#patch20 -p1 -b .egbe %patch20 -p1 -b .egbe
%patch21 -p1 -b .glpc %patch25 -p1 -b .llvmimm
%patch26 -p1 -b .texcmprs


%if 0%{with_private_llvm} %if 0%{with_private_llvm}
sed -i 's/\[llvm-config\]/\[llvm-private-config-%{__isa_bits}\]/g' configure.ac sed -i 's/\[llvm-config\]/\[mesa-private-llvm-config-%{__isa_bits}\]/g' configure.ac
sed -i 's/`$LLVM_CONFIG --version`/$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR-pel/' configure.ac sed -i 's/`$LLVM_CONFIG --version`/$LLVM_VERSION_MAJOR.$LLVM_VERSION_MINOR-mesa/' configure.ac
%endif %endif


# need to use libdrm_nouveau2 on F17 # need to use libdrm_nouveau2 on F17
@ -367,7 +338,6 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"


%configure \ %configure \
%{?asm_flags} \ %{?asm_flags} \
--enable-libglvnd \
--enable-selinux \ --enable-selinux \
--enable-osmesa \ --enable-osmesa \
--with-dri-driverdir=%{_libdir}/dri \ --with-dri-driverdir=%{_libdir}/dri \
@ -382,19 +352,20 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-exceptions"
--disable-opencl \ --disable-opencl \
--enable-glx-tls \ --enable-glx-tls \
--enable-texture-float=yes \ --enable-texture-float=yes \
%if %{with_vulkan}
%{?vulkan_drivers} \
%endif
%{?with_llvm:--enable-gallium-llvm} \ %{?with_llvm:--enable-gallium-llvm} \
%{?with_llvm:--with-llvm-shared-libs} \
--enable-dri \ --enable-dri \
%if %{with_hardware} %if %{with_hardware}
%{?with_vmware:--enable-xa} \ %{?with_vmware:--enable-xa} \
--with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,}%{?with_llvm:swrast,r600,r300,}%{?with_freedreno:freedreno,}nouveau,virgl \ --with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,}%{?with_llvm:swrast,r600,}%{?with_freedreno:freedreno,}r300,nouveau \
%else %else
--with-gallium-drivers=%{?with_llvm:swrast} \ --with-gallium-drivers=%{?with_llvm:swrast} \
%endif %endif
%{?dri_drivers} %{?dri_drivers}


# this seems to be neccessary for s390
make -C src/mesa/drivers/dri/common/xmlpool/

make %{?_smp_mflags} MKDEP=/bin/true make %{?_smp_mflags} MKDEP=/bin/true


%install %install
@ -405,8 +376,6 @@ make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?rhel} %if 0%{?rhel}
# remove pre-DX9 drivers # remove pre-DX9 drivers
rm -f $RPM_BUILD_ROOT%{_libdir}/dri/{radeon,r200,nouveau_vieux}_dri.* rm -f $RPM_BUILD_ROOT%{_libdir}/dri/{radeon,r200,nouveau_vieux}_dri.*
# remove r300 vdpau
rm -f $RPM_BUILD_ROOT%{_libdir}/vdpau/libvdpau_r300.*
%endif %endif


%if !%{with_hardware} %if !%{with_hardware}
@ -415,25 +384,12 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/drirc


# libvdpau opens the versioned name, don't bother including the unversioned # libvdpau opens the versioned name, don't bother including the unversioned
rm -f $RPM_BUILD_ROOT%{_libdir}/vdpau/*.so rm -f $RPM_BUILD_ROOT%{_libdir}/vdpau/*.so
# likewise glvnd
rm -f %{buildroot}%{_libdir}/libGLX_mesa.so
rm -f %{buildroot}%{_libdir}/libEGL_mesa.so
# XXX can we just not build this
rm -f %{buildroot}%{_libdir}/libGLES*

# XXX wayland-egl?

# glvnd needs a default provider for indirect rendering where it cannot
# determine the vendor
ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_system.so.0


# strip out useless headers # strip out useless headers
rm -f $RPM_BUILD_ROOT%{_includedir}/GL/w*.h rm -f $RPM_BUILD_ROOT%{_includedir}/GL/w*.h


rm -rf $RPM_BUILD_ROOT%{_libdir}/gallium-pipe/ rm -rf $RPM_BUILD_ROOT%{_libdir}/gallium-pipe/


rm -f $RPM_BUILD_ROOT%{_includedir}/vulkan/vulkan_intel.h

# remove .la files # remove .la files
find $RPM_BUILD_ROOT -name \*.la | xargs rm -f find $RPM_BUILD_ROOT -name \*.la | xargs rm -f


@ -472,21 +428,25 @@ rm -rf $RPM_BUILD_ROOT


%files libGL %files libGL
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libGLX_mesa.so.0* %doc docs/COPYING
%{_libdir}/libGLX_system.so.0* %{_libdir}/libGL.so.1
%{_libdir}/libGL.so.1.*


%files libEGL %files libEGL
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_datadir}/glvnd/egl_vendor.d/50_mesa.json %doc docs/COPYING
%{_libdir}/libEGL_mesa.so.0* %{_libdir}/libEGL.so.1
%{_libdir}/libEGL.so.1.*


%files libGLES %files libGLES
%defattr(-,root,root,-) %defattr(-,root,root,-)
# no files, all provided by libglvnd %doc docs/COPYING
%{_libdir}/libGLESv2.so.2
%{_libdir}/libGLESv2.so.2.*


%files filesystem %files filesystem
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/Mesa-MLAA-License-Clarification-Email.txt %doc docs/COPYING docs/Mesa-MLAA-License-Clarification-Email.txt
%dir %{_libdir}/dri %dir %{_libdir}/dri
%if %{with_hardware} %if %{with_hardware}
%if 0%{?with_vdpau} %if 0%{?with_vdpau}
@ -507,8 +467,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/dri/r200_dri.so %{_libdir}/dri/r200_dri.so
%{_libdir}/dri/nouveau_vieux_dri.so %{_libdir}/dri/nouveau_vieux_dri.so
%endif %endif
%if 0%{?with_llvm}
%{_libdir}/dri/r300_dri.so %{_libdir}/dri/r300_dri.so
%if 0%{?with_llvm}
%{_libdir}/dri/r600_dri.so %{_libdir}/dri/r600_dri.so
%if 0%{?with_radeonsi} %if 0%{?with_radeonsi}
%{_libdir}/dri/radeonsi_dri.so %{_libdir}/dri/radeonsi_dri.so
@ -520,10 +480,8 @@ rm -rf $RPM_BUILD_ROOT
%endif %endif
%if 0%{?with_freedreno} %if 0%{?with_freedreno}
%{_libdir}/dri/kgsl_dri.so %{_libdir}/dri/kgsl_dri.so
%{_libdir}/dri/msm_dri.so
%endif %endif
%{_libdir}/dri/nouveau_dri.so %{_libdir}/dri/nouveau_dri.so
%{_libdir}/dri/virtio_gpu_dri.so
%if 0%{?with_vmware} %if 0%{?with_vmware}
%{_libdir}/dri/vmwgfx_dri.so %{_libdir}/dri/vmwgfx_dri.so
%endif %endif
@ -561,6 +519,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_includedir}/GL/internal %dir %{_includedir}/GL/internal
%{_includedir}/GL/internal/dri_interface.h %{_includedir}/GL/internal/dri_interface.h
%{_libdir}/pkgconfig/dri.pc %{_libdir}/pkgconfig/dri.pc
%{_libdir}/libGL.so
%{_libdir}/libglapi.so %{_libdir}/libglapi.so
%{_libdir}/pkgconfig/gl.pc %{_libdir}/pkgconfig/gl.pc


@ -575,23 +534,24 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_includedir}/KHR %dir %{_includedir}/KHR
%{_includedir}/KHR/khrplatform.h %{_includedir}/KHR/khrplatform.h
%{_libdir}/pkgconfig/egl.pc %{_libdir}/pkgconfig/egl.pc
%{_libdir}/libEGL.so


%files libGLES-devel %files libGLES-devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{_includedir}/GLES2 %dir %{_includedir}/GLES2
%dir %{_includedir}/GLES3
%{_includedir}/GLES2/gl2platform.h %{_includedir}/GLES2/gl2platform.h
%{_includedir}/GLES2/gl2.h %{_includedir}/GLES2/gl2.h
%{_includedir}/GLES2/gl2ext.h %{_includedir}/GLES2/gl2ext.h
%{_includedir}/GLES3/gl3platform.h %{_includedir}/GLES3/gl3platform.h
%{_includedir}/GLES3/gl3.h %{_includedir}/GLES3/gl3.h
%{_includedir}/GLES3/gl31.h %{_includedir}/GLES3/gl31.h
%{_includedir}/GLES3/gl32.h
%{_includedir}/GLES3/gl3ext.h %{_includedir}/GLES3/gl3ext.h
%{_libdir}/pkgconfig/glesv2.pc %{_libdir}/pkgconfig/glesv2.pc
%{_libdir}/libGLESv2.so


%files libOSMesa %files libOSMesa
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/COPYING
%{_libdir}/libOSMesa.so.8* %{_libdir}/libOSMesa.so.8*


%files libOSMesa-devel %files libOSMesa-devel
@ -603,6 +563,7 @@ rm -rf $RPM_BUILD_ROOT


%files libgbm %files libgbm
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/COPYING
%{_libdir}/libgbm.so.1 %{_libdir}/libgbm.so.1
%{_libdir}/libgbm.so.1.* %{_libdir}/libgbm.so.1.*


@ -612,9 +573,10 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/gbm.h %{_includedir}/gbm.h
%{_libdir}/pkgconfig/gbm.pc %{_libdir}/pkgconfig/gbm.pc


%if %{with wayland} %if !0%{?rhel}
%files libwayland-egl %files libwayland-egl
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/COPYING
%{_libdir}/libwayland-egl.so.1 %{_libdir}/libwayland-egl.so.1
%{_libdir}/libwayland-egl.so.1.* %{_libdir}/libwayland-egl.so.1.*


@ -627,6 +589,7 @@ rm -rf $RPM_BUILD_ROOT
%if 0%{?with_vmware} %if 0%{?with_vmware}
%files libxatracker %files libxatracker
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/COPYING
%if %{with_hardware} %if %{with_hardware}
%{_libdir}/libxatracker.so.2 %{_libdir}/libxatracker.so.2
%{_libdir}/libxatracker.so.2.* %{_libdir}/libxatracker.so.2.*
@ -643,126 +606,7 @@ rm -rf $RPM_BUILD_ROOT
%endif %endif
%endif %endif


%if 0%{?with_vulkan}
%files vulkan-drivers
%ifarch x86_64
%{_libdir}/libvulkan_intel.so
%{_datadir}/vulkan/icd.d/intel_icd.x86_64.json
%endif
%{_libdir}/libvulkan_radeon.so
%ifarch x86_64
%{_datadir}/vulkan/icd.d/radeon_icd.x86_64.json
%endif
%ifarch ppc64le
%{_datadir}/vulkan/icd.d/radeon_icd.powerpc64le.json
%endif
%endif

%changelog %changelog
* Tue Jul 24 2018 Dave Airlie <airlied@redhat.com> - 18.0.5-3
- rename fedora to system in glvnd fallback

* Thu Jul 19 2018 Dave Airlie <airlied@redhat.com> - 18.0.5-2
- Fix timeout overflow warnings (backport from upstream + virgl)

* Wed Jun 20 2018 Adam Jackson <ajax@redhat.com> - 18.0.5-1
- Mesa 18.0.5

* Wed May 30 2018 Dave Airlie <airlied@redhat.com - 18.0.4-1.20180530
- rebase to 18.0.4
- backport shm put/get image for improved sw renderers (esp under qxl)

* Tue May 29 2018 Adam Jackson <ajax@redhat.com> - 18.0.3-5.20180508
- Fix gl.pc when using glvnd
- Fix subpackage dependencies for glvnd

* Fri May 25 2018 Adam Jackson <ajax@redhat.com> - 18.0.3-2.20180508
- Use glvnd

* Tue May 08 2018 Dave Airlie <airlied@redhat.com> 18.0.3-1.20180508
- rebase to 18.0.3

* Wed Apr 18 2018 Adam Jackson <ajax@redhat.com> - 17.2.3-9
- Rebuild for new llvm

* Mon Jan 15 2018 Dave Airlie <airlied@redhat.com> - 17.2.3-8.20171019
- Add missing Intel CFL ids.

* Thu Nov 30 2017 Lyude Paul <lyude@redhat.com> - 17.2.3-7.20171019
- Add patches to fix cache lines with DRI_PRIME + amdgpu (#1503861)

* Fri Nov 17 2017 Dave Airlie <airlied@redhat.com> - 17.2.3-6.20171019
- fix libgbm/dri-drivers requires on libdrm

* Wed Oct 25 2017 Yaakov Selkowitz <yselkowi@redhat.com> - 17.2.3-5.20171019
- Enable hardware drivers on aarch64 (#1358444)

* Tue Oct 24 2017 Dave Airlie <airlied@redhat.com> - 17.2.3-4.20171019
- Update gitdate and clean out sources.

* Tue Oct 24 2017 Dave Airlie <airlied@redhat.com> - 17.2.3-3.20171019
- Add final 17.2.3 patch.

* Thu Oct 19 2017 Tom Stellard <tstellar@redhat.com> - 17.2.3-2.20171019
- Switch to llvm-private

* Thu Oct 19 2017 Dave Airlie <airlied@redhat.com> - 17.2.3-1.20171019
- rebase to 17.2.3

* Thu Oct 05 2017 Dave Airlie <airlied@redhat.com> - 17.2.2-1.20171005
- rebase to 17.2.2 final release + s3tc support

* Thu Sep 28 2017 Olivier Fourdan <ofourdan@redhat.com> - 17.2.0-2.20170911
- Enable wayland-egl, add dependencies on wayland-protocols (#1481412)

* Mon Sep 11 2017 Dave Airlie <airlied@redhat.com> - 17.2.0-1.20170911
- rebase to 17.2.0 final release

* Tue Aug 15 2017 Dave Airlie <airlied@redhat.com> - 17.2.0-0.1.20170815
- rebase to 17.2-rc4

* Thu May 11 2017 Dave Airlie <airlied@redhat.com> - 17.0.1-6.20170307
- enable VDPAU drivers (#1297276)

* Tue May 09 2017 Tom Stellard <tstellar@redhat.com> - 17.0.1-5.20170307
- Use correct datalayout for llvmpipe (#1445423)

* Fri May 05 2017 Adam Jackson <ajax@redhat.com> - 17.0.1-4.20170307
- Add ppc64le vulkan build

* Wed May 03 2017 Lyude Paul <lyude@redhat.com> - 17.0.1-3.20170307
- Add temporary revert for #1438891

* Tue Mar 28 2017 Dave Airlie <airlied@redhat.com> - 17.0.1-2.20170307
- Allow compat shaders override. (#1429813)

* Tue Mar 07 2017 Dave Airlie <airlied@redhat.com> - 17.0.1-1.20170307
- mesa 17.0.1 release

* Tue Feb 28 2017 Dave Airlie <airlied@redhat.com> - 17.0.0-2.20170215
- enable more drivers on aarch64 + vulkan drivers (#1358444)

* Wed Feb 15 2017 Dave Airlie <airlied@redhat.com> - 17.0.0-1.20170215
- mesa 17.0.0 release

* Mon Feb 06 2017 Adam Jackson <ajax@redhat.com> - 17.0.0-0.2.20170123
- Rebuild against (and BuildRequire) mesa-private-llvm >= 3.9

* Mon Jan 23 2017 Dave Airlie <airlied@redhat.com> - 17.0.0-0.1.20170123
- mesa 17.0.0-rc1

* Tue Aug 09 2016 Rob Clark <rclark@redhat.com> - 11.2.2-2.20160614
- update kbl pci ids.

* Tue Jun 14 2016 Dave Airlie <airlied@redhat.com> - 11.2.2-1.20160614
- mesa 11.2.2 release

* Tue Apr 05 2016 Dave Airlie <airlied@redhat.com> 11.2.0-1.20160405
- mesa 11.2.0 final release

* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 11.2.0-0.2.20160310
- mesa 11.2.0-rc2 release + enable virgl

* Thu Sep 17 2015 Oded Gabbay <oded.gabbay@redhat.com> 10.6.5-3.20150824 * Thu Sep 17 2015 Oded Gabbay <oded.gabbay@redhat.com> 10.6.5-3.20150824
- Fix texture compression for big-endian (#1250168) - Fix texture compression for big-endian (#1250168)



Loading…
Cancel
Save