Fix s390x build

- Fold khrplatform-devel in to libEGL-devel
This commit is contained in:
Adam Jackson 2013-06-12 18:12:04 -04:00
parent 5311515163
commit 201b5f4c71
2 changed files with 13 additions and 112 deletions

View File

@ -1,59 +1,17 @@
From 5bfa2890c634883260429e7360a3a0367ef47316 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 1 May 2013 13:23:13 -0400
Subject: [PATCH] configure: --enable-texture-float={yes,no,hardware}
This enables building float-texture support for hardware drivers but not
software drivers.
This is obviously not upstreamable in its current form.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
configure.ac | 6 +++---
src/gallium/drivers/llvmpipe/lp_screen.c | 9 +++++++++
src/gallium/drivers/softpipe/sp_screen.c | 9 +++++++++
3 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 81d4a3f..970dacf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,15 +381,15 @@ dnl
dnl potentially-infringing-but-nobody-knows-for-sure stuff
dnl
AC_ARG_ENABLE([texture-float],
- [AS_HELP_STRING([--enable-texture-float],
+ [AS_HELP_STRING([--enable-texture-float=yes,no,hardware],
[enable floating-point textures and renderbuffers @<:@default=disabled@:>@])],
[enable_texture_float="$enableval"],
[enable_texture_float=no]
)
-if test "x$enable_texture_float" = xyes; then
+if test "x$enable_texture_float" = xyes -o "x$enable_texture_float" = xhardware; then
AC_MSG_WARN([Floating-point textures enabled.])
AC_MSG_WARN([Please consult docs/patents.txt with your lawyer before building Mesa.])
- DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED"
+ DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED=$enable_texture_float"
fi
GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 5ec1df6..a0406fc 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -306,6 +306,15 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
@@ -306,6 +306,13 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
if (!format_desc)
return FALSE;
+#if 1
+ if ((bind & PIPE_BIND_RENDER_TARGET) &&
+ format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
+ format != PIPE_FORMAT_R11G11B10_FLOAT &&
+ util_format_is_float(format)) {
+ return FALSE;
+ }
+#endif
+
assert(target == PIPE_BUFFER ||
target == PIPE_TEXTURE_1D ||
@ -62,70 +20,17 @@ diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/soft
index 937035e..2f5e571 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -291,6 +291,15 @@ softpipe_is_format_supported( struct pipe_screen *screen,
@@ -291,6 +291,13 @@ softpipe_is_format_supported( struct pipe_screen *screen,
if (!format_desc)
return FALSE;
+#if 1
+ if ((bind & PIPE_BIND_RENDER_TARGET) &&
+ format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
+ format != PIPE_FORMAT_R11G11B10_FLOAT &&
+ util_format_is_float(format)) {
+ return FALSE;
+ }
+#endif
+
if (sample_count > 1)
return FALSE;
--
1.8.2.1
diff -up mesa-20130508/src/gallium/auxiliary/util/u_format_table.py.jx mesa-20130508/src/gallium/auxiliary/util/u_format_table.py
--- mesa-20130508/src/gallium/auxiliary/util/u_format_table.py.jx 2013-05-08 13:23:41.000000000 -0400
+++ mesa-20130508/src/gallium/auxiliary/util/u_format_table.py 2013-05-08 15:20:02.145510681 -0400
@@ -133,15 +133,35 @@ def write_format_table(formats):
print " },"
print " %s," % (colorspace_map(format.colorspace),)
if format.colorspace != ZS and format.channels[0].pure == False:
- print " &util_format_%s_unpack_rgba_8unorm," % format.short_name()
- print " &util_format_%s_pack_rgba_8unorm," % format.short_name()
- if format.layout == 's3tc' or format.layout == 'rgtc':
- print " &util_format_%s_fetch_rgba_8unorm," % format.short_name()
- else:
- print " NULL, /* fetch_rgba_8unorm */"
- print " &util_format_%s_unpack_rgba_float," % format.short_name()
- print " &util_format_%s_pack_rgba_float," % format.short_name()
- print " &util_format_%s_fetch_rgba_float," % format.short_name()
+ if "float" in format.short_name():
+ print "#if 0"
+ print " &util_format_%s_unpack_rgba_8unorm," % format.short_name()
+ print " &util_format_%s_pack_rgba_8unorm," % format.short_name()
+ if format.layout == 's3tc' or format.layout == 'rgtc':
+ print " &util_format_%s_fetch_rgba_8unorm," % format.short_name()
+ else:
+ print " NULL, /* fetch_rgba_8unorm */"
+ print " &util_format_%s_unpack_rgba_float," % format.short_name()
+ print " &util_format_%s_pack_rgba_float," % format.short_name()
+ print " &util_format_%s_fetch_rgba_float," % format.short_name()
+ print "#else"
+ print " NULL, /* unpack_rgba_8unorm */"
+ print " NULL, /* pack_rgba_8unorm */"
+ print " NULL, /* fetch_rgba_8unorm */"
+ print " NULL, /* unpack_rgba_float */"
+ print " NULL, /* pack_rgba_float */"
+ print " NULL, /* fetch_rgba_float */"
+ print "#endif"
+ else:
+ print " &util_format_%s_unpack_rgba_8unorm," % format.short_name()
+ print " &util_format_%s_pack_rgba_8unorm," % format.short_name()
+ if format.layout == 's3tc' or format.layout == 'rgtc':
+ print " &util_format_%s_fetch_rgba_8unorm," % format.short_name()
+ else:
+ print " NULL, /* fetch_rgba_8unorm */"
+ print " &util_format_%s_unpack_rgba_float," % format.short_name()
+ print " &util_format_%s_pack_rgba_float," % format.short_name()
+ print " &util_format_%s_fetch_rgba_float," % format.short_name()
else:
print " NULL, /* unpack_rgba_8unorm */"
print " NULL, /* pack_rgba_8unorm */"

View File

@ -54,7 +54,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 9.2
Release: 0.9.%{gitdate}%{?dist}
Release: 0.10.%{gitdate}%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@ -170,14 +170,6 @@ Requires: mesa-filesystem%{?_isa}
Mesa-based VDPAU drivers.
%endif
%package -n khrplatform-devel
Summary: Khronos platform development package
Group: Development/Libraries
BuildArch: noarch
%description -n khrplatform-devel
Khronos platform development package
%package libGL-devel
Summary: Mesa libGL development package
Group: Development/Libraries
@ -192,7 +184,8 @@ Mesa libGL development package
Summary: Mesa libEGL development package
Group: Development/Libraries
Requires: mesa-libEGL = %{version}-%{release}
Requires: khrplatform-devel >= %{version}-%{release}
Provides: khrplatform-devel = %{version}-%{release}
Obsoletes: khrplatform-devel < %{version}-%{release}
%description libEGL-devel
Mesa libEGL development package
@ -201,7 +194,6 @@ Mesa libEGL development package
Summary: Mesa libGLES development package
Group: Development/Libraries
Requires: mesa-libGLES = %{version}-%{release}
Requires: khrplatform-devel >= %{version}-%{release}
%description libGLES-devel
Mesa libGLES development package
@ -387,6 +379,10 @@ make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/dri/{radeon,r200,nouveau_vieux}_dri.*
%endif
%if !%{with_hardware}
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/drirc
%endif
# libvdpau opens the versioned name, don't bother including the unversioned
rm -f $RPM_BUILD_ROOT%{_libdir}/vdpau/*.so
@ -511,10 +507,6 @@ rm -rf $RPM_BUILD_ROOT
%endif
%endif
%files -n khrplatform-devel
%defattr(-,root,root,-)
%{_includedir}/KHR
%files libGL-devel
%defattr(-,root,root,-)
%{_includedir}/GL/gl.h
@ -612,6 +604,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Wed Jun 12 2013 Adam Jackson <ajax@redhat.com> 9.2-0.10.20130610
- Fix s390x build
- Fold khrplatform-devel in to libEGL-devel
* Tue Jun 11 2013 Adam Jackson <ajax@redhat.com> 9.2-0.9.20130610
- 0001-Revert-i965-Disable-unused-pipeline-stages-once-at-s.patch: Fix some
hangs on ivb+