Accepting request 116730 from X11:XOrg
Added upstream patches from Master to resolve build issues with llvm 3.1. (forwarded request 115850 from tittiatcoke) OBS-URL: https://build.opensuse.org/request/show/116730 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Mesa?expand=0&rev=144
This commit is contained in:
commit
0a542dd6ed
@ -1,8 +1,18 @@
|
|||||||
Index: Mesa-7.11.1/src/mesa/main/es_generator.py
|
From da91936f74e4195fbb3ed4da0eaecb9f1ec66972 Mon Sep 17 00:00:00 2001
|
||||||
===================================================================
|
From: Tobias Johannes Klausmann <tobias.johannes.klausmann@mni.thm.de>
|
||||||
--- Mesa-7.11.1.orig/src/mesa/main/es_generator.py 2011-11-17 20:45:06.000000000 +0100
|
Date: Fri, 20 Apr 2012 14:09:50 +0200
|
||||||
+++ Mesa-7.11.1/src/mesa/main/es_generator.py 2012-03-01 09:27:01.392009165 +0100
|
Subject: [PATCH] PATCH-FIX-OPENSUSE do not put dates in sources to fix
|
||||||
@@ -182,9 +182,8 @@ print """/* DO NOT EDIT ****************
|
build-compare
|
||||||
|
|
||||||
|
---
|
||||||
|
src/mesa/main/es_generator.py | 3 +--
|
||||||
|
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
|
||||||
|
index cad3dea..0dde6f7 100644
|
||||||
|
--- a/src/mesa/main/es_generator.py
|
||||||
|
+++ b/src/mesa/main/es_generator.py
|
||||||
|
@@ -182,9 +182,8 @@ print """/* DO NOT EDIT *************************************************
|
||||||
* THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT
|
* THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT
|
||||||
* API specification file: %s
|
* API specification file: %s
|
||||||
* GLES version: %s
|
* GLES version: %s
|
||||||
@ -13,3 +23,6 @@ Index: Mesa-7.11.1/src/mesa/main/es_generator.py
|
|||||||
|
|
||||||
# The headers we choose are version-specific.
|
# The headers we choose are version-specific.
|
||||||
print """
|
print """
|
||||||
|
--
|
||||||
|
1.7.7
|
||||||
|
|
||||||
|
25
Mesa.changes
25
Mesa.changes
@ -1,3 +1,28 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 25 14:14:35 UTC 2012 - tittiatcoke@gmail.com
|
||||||
|
|
||||||
|
- Added patches from upstream Master to enable building with
|
||||||
|
llvm 3.1
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 25 13:17:59 UTC 2012 - sndirsch@suse.com
|
||||||
|
|
||||||
|
- For full OpenGL 3.0 compliance, it is necessary to
|
||||||
|
have floating-point textures, so Mesa is now compiled with
|
||||||
|
"--enable-texture-float" parameter to have OpenGL 3.0 support.
|
||||||
|
- disabling glut/glw no longer required since it's no longer
|
||||||
|
shipped with Mesa
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 23 15:09:29 UTC 2012 - vljn@ovi.com
|
||||||
|
|
||||||
|
- Enable xa state tracker and svga gallium drivers (vmwgfx stack)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 15 18:10:39 CEST 2012 - ro@suse.de
|
||||||
|
|
||||||
|
- use same dri drivers on ia64 as on ppc (no drm_intel)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Mar 21 23:21:24 UTC 2012 - ryanbach@adelphia.net
|
Wed Mar 21 23:21:24 UTC 2012 - ryanbach@adelphia.net
|
||||||
|
|
||||||
|
73
Mesa.spec
73
Mesa.spec
@ -17,10 +17,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
%define _version 8.0.1
|
%define _version 8.0.2
|
||||||
|
%define _name_archive mesa
|
||||||
|
|
||||||
Name: Mesa
|
Name: Mesa
|
||||||
Version: 8.0.1
|
Version: 8.0.2
|
||||||
Release: 0
|
Release: 0
|
||||||
BuildRequires: autoconf >= 2.59
|
BuildRequires: autoconf >= 2.59
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -75,7 +76,7 @@ Provides: XFree86-Mesa-64bit = %{version}
|
|||||||
Summary: System for rendering interactive 3-D graphics
|
Summary: System for rendering interactive 3-D graphics
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Source: MesaLib-%{_version}.tar.bz2
|
Source: %{_name_archive}-%{_version}.tar.gz
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Source3: README.updates
|
Source3: README.updates
|
||||||
Source4: manual-pages.tar.bz2
|
Source4: manual-pages.tar.bz2
|
||||||
@ -85,8 +86,8 @@ Source6: %name-rpmlintrc
|
|||||||
Patch1: Mesa-nodate.diff
|
Patch1: Mesa-nodate.diff
|
||||||
# to be upstreamed
|
# to be upstreamed
|
||||||
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
|
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
|
||||||
# already upstream
|
# Patch from upstream master to resolve build issues with llvm 3.1
|
||||||
Patch12: U_gallium-rtasm-properly-detect-SSE-and-SSE2.patch
|
Patch12: upstream-llvm-patch.diff
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -349,6 +350,35 @@ openwfd.
|
|||||||
This package provides the development environment for compiling
|
This package provides the development environment for compiling
|
||||||
programs against the GBM library.
|
programs against the GBM library.
|
||||||
|
|
||||||
|
%package -n libxatracker1
|
||||||
|
Summary: XA state tracker
|
||||||
|
Group: System/Libraries
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 0
|
||||||
|
|
||||||
|
%description -n libxatracker1
|
||||||
|
This package contains the XA state tracker for gallium3D driver.
|
||||||
|
It superseeds the Xorg state tracker and provides an infrastructure
|
||||||
|
to accelerate Xorg 2D operations. It is currently used by vmwgfx
|
||||||
|
video driver.
|
||||||
|
|
||||||
|
%package -n libxatracker-devel
|
||||||
|
Summary: Development files for the XA API
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 0
|
||||||
|
Requires: libxatracker1 = %version
|
||||||
|
|
||||||
|
%description -n libxatracker-devel
|
||||||
|
This package contains the XA state tracker for gallium3D driver.
|
||||||
|
It superseeds the Xorg state tracker and provides an infrastructure
|
||||||
|
to accelerate Xorg 2D operations. It is currently used by vmwgfx
|
||||||
|
video driver.
|
||||||
|
|
||||||
|
This package provides the development environment for compiling
|
||||||
|
programs against the XA state tracker.
|
||||||
|
|
||||||
|
|
||||||
%package -n Mesa-libglapi0
|
%package -n Mesa-libglapi0
|
||||||
Summary: Free implementation of the GL API
|
Summary: Free implementation of the GL API
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
@ -358,13 +388,10 @@ The Mesa GL API module is responsible for dispatching all the gl*
|
|||||||
functions. It is intended to be mainly used by the Mesa-libGLES*
|
functions. It is intended to be mainly used by the Mesa-libGLES*
|
||||||
packages.
|
packages.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n %{name}-%{_version} -b4 -q
|
%setup -n %{_name_archive}-%{_version} -b4 -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
# no need to build (GLUT-)Demos
|
|
||||||
rm -rf src/glut progs/{demos,redbook,samples,xdemos,glsl}
|
|
||||||
# we use freeglut
|
|
||||||
rm -f include/GL/{glut.h,uglglutshapes.h,glutf90.h}
|
|
||||||
# remove some docs
|
# remove some docs
|
||||||
rm -rf docs/README.{VMS,WIN32,OS2}
|
rm -rf docs/README.{VMS,WIN32,OS2}
|
||||||
#%patch11 -p1
|
#%patch11 -p1
|
||||||
@ -377,20 +404,21 @@ rm -f src/mesa/depend
|
|||||||
export TALLOC_LIBS=-ltalloc
|
export TALLOC_LIBS=-ltalloc
|
||||||
export TALLOC_CFLAGS="-I/usr/include"
|
export TALLOC_CFLAGS="-I/usr/include"
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
%configure --disable-glw \
|
%configure --enable-gles1 \
|
||||||
--enable-gles1 \
|
|
||||||
--enable-gles2 \
|
--enable-gles2 \
|
||||||
--with-driver=dri \
|
--with-driver=dri \
|
||||||
--with-egl-platforms=x11,drm \
|
--with-egl-platforms=x11,drm \
|
||||||
--enable-shared-glapi \
|
--enable-shared-glapi \
|
||||||
--enable-shared-dricore \
|
--enable-shared-dricore \
|
||||||
|
--enable-xa \
|
||||||
|
--enable-texture-float \
|
||||||
--with-dri-searchpath=/usr/%{_lib}/dri/updates:/usr/%{_lib}/dri \
|
--with-dri-searchpath=/usr/%{_lib}/dri/updates:/usr/%{_lib}/dri \
|
||||||
%ifarch %ix86 x86_64
|
%ifarch %ix86 x86_64
|
||||||
--enable-gallium-llvm \
|
--enable-gallium-llvm \
|
||||||
--with-dri-drivers=i915,i965,nouveau,r200,radeon \
|
--with-dri-drivers=i915,i965,nouveau,r200,radeon \
|
||||||
--with-gallium-drivers=r300,r600,nouveau,swrast \
|
--with-gallium-drivers=r300,r600,nouveau,swrast,svga \
|
||||||
%endif
|
%endif
|
||||||
%ifarch ppc ppc64 %sparc hppa
|
%ifarch ia64 ppc ppc64 %sparc hppa
|
||||||
--with-dri-drivers=nouveau,r200,radeon \
|
--with-dri-drivers=nouveau,r200,radeon \
|
||||||
--with-gallium-drivers=r300,r600,nouveau,swrast \
|
--with-gallium-drivers=r300,r600,nouveau,swrast \
|
||||||
%endif
|
%endif
|
||||||
@ -398,7 +426,6 @@ autoreconf -fi
|
|||||||
--with-dri-drivers=swrast \
|
--with-dri-drivers=swrast \
|
||||||
--with-gallium-drivers="" \
|
--with-gallium-drivers="" \
|
||||||
%endif
|
%endif
|
||||||
--disable-glut \
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
|
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
@ -406,8 +433,6 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
make realclean
|
make realclean
|
||||||
%configure --with-driver=xlib \
|
%configure --with-driver=xlib \
|
||||||
--disable-glu \
|
--disable-glu \
|
||||||
--disable-glw \
|
|
||||||
--disable-glut \
|
|
||||||
--with-gallium-drivers="" \
|
--with-gallium-drivers="" \
|
||||||
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
|
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
|
||||||
sed -i 's/GL_LIB = .*/GL_LIB = IndirectGL/g' configs/autoconf
|
sed -i 's/GL_LIB = .*/GL_LIB = IndirectGL/g' configs/autoconf
|
||||||
@ -466,6 +491,10 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
|
|||||||
|
|
||||||
%postun -n libgbm1 -p /sbin/ldconfig
|
%postun -n libgbm1 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post -n libxatracker1 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libxatracker1 -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -n Mesa-libglapi0 -p /sbin/ldconfig
|
%post -n Mesa-libglapi0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n Mesa-libglapi0 -p /sbin/ldconfig
|
%postun -n Mesa-libglapi0 -p /sbin/ldconfig
|
||||||
@ -551,6 +580,16 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
|
|||||||
%_libdir/libgbm.so
|
%_libdir/libgbm.so
|
||||||
%_libdir/pkgconfig/gbm.pc
|
%_libdir/pkgconfig/gbm.pc
|
||||||
|
|
||||||
|
%files -n libxatracker1
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%_libdir/libxatracker.so.1*
|
||||||
|
|
||||||
|
%files -n libxatracker-devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%_includedir/xa_*.h
|
||||||
|
%_libdir/libxatracker.so
|
||||||
|
%_libdir/pkgconfig/xatracker.pc
|
||||||
|
|
||||||
%files -n Mesa-libglapi0
|
%files -n Mesa-libglapi0
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_libdir/libglapi.so.0*
|
%_libdir/libglapi.so.0*
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:593af02ea2b5b7afb057a12c550f2c03b1d1cf59a716972d601c1499545ea0a7
|
|
||||||
size 5694019
|
|
@ -1,85 +0,0 @@
|
|||||||
From 74d303521e6ba41d1cbeb75edb2f834ebbe8c550 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <maraeo@gmail.com>
|
|
||||||
Date: Fri, 24 Feb 2012 19:29:48 +0100
|
|
||||||
Subject: [PATCH] gallium/rtasm: properly detect SSE and SSE2
|
|
||||||
|
|
||||||
This should fix crashes on ancient processors.
|
|
||||||
---
|
|
||||||
src/gallium/auxiliary/rtasm/rtasm_cpu.c | 48 +++++++++++++++---------------
|
|
||||||
1 files changed, 24 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/gallium/auxiliary/rtasm/rtasm_cpu.c b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
|
|
||||||
index 0461c81..7afcf14 100644
|
|
||||||
--- a/src/gallium/auxiliary/rtasm/rtasm_cpu.c
|
|
||||||
+++ b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
|
|
||||||
@@ -25,43 +25,43 @@
|
|
||||||
*
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
+#include "pipe/p_config.h"
|
|
||||||
+#include "rtasm_cpu.h"
|
|
||||||
+
|
|
||||||
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
|
||||||
|
|
||||||
#include "util/u_debug.h"
|
|
||||||
-#include "rtasm_cpu.h"
|
|
||||||
+#include "util/u_cpu_detect.h"
|
|
||||||
|
|
||||||
+DEBUG_GET_ONCE_BOOL_OPTION(nosse, "GALLIUM_NOSSE", FALSE);
|
|
||||||
|
|
||||||
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
|
||||||
-static boolean rtasm_sse_enabled(void)
|
|
||||||
+static struct util_cpu_caps *get_cpu_caps(void)
|
|
||||||
{
|
|
||||||
- static boolean firsttime = 1;
|
|
||||||
- static boolean enabled;
|
|
||||||
-
|
|
||||||
- /* This gets called quite often at the moment:
|
|
||||||
- */
|
|
||||||
- if (firsttime) {
|
|
||||||
- enabled = !debug_get_bool_option("GALLIUM_NOSSE", FALSE);
|
|
||||||
- firsttime = FALSE;
|
|
||||||
- }
|
|
||||||
- return enabled;
|
|
||||||
+ util_cpu_detect();
|
|
||||||
+ return &util_cpu_caps;
|
|
||||||
}
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
int rtasm_cpu_has_sse(void)
|
|
||||||
{
|
|
||||||
- /* FIXME: actually detect this at run-time */
|
|
||||||
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
|
||||||
- return rtasm_sse_enabled();
|
|
||||||
-#else
|
|
||||||
- return 0;
|
|
||||||
-#endif
|
|
||||||
+ return !debug_get_option_nosse() && get_cpu_caps()->has_sse;
|
|
||||||
}
|
|
||||||
|
|
||||||
int rtasm_cpu_has_sse2(void)
|
|
||||||
{
|
|
||||||
- /* FIXME: actually detect this at run-time */
|
|
||||||
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
|
||||||
- return rtasm_sse_enabled();
|
|
||||||
+ return !debug_get_option_nosse() && get_cpu_caps()->has_sse2;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
#else
|
|
||||||
+
|
|
||||||
+int rtasm_cpu_has_sse(void)
|
|
||||||
+{
|
|
||||||
return 0;
|
|
||||||
-#endif
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+int rtasm_cpu_has_sse2(void)
|
|
||||||
+{
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
--
|
|
||||||
1.7.3.4
|
|
||||||
|
|
3
mesa-8.0.2.tar.gz
Normal file
3
mesa-8.0.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:dedddfcbd2b72031db2debe12a3088f47d8036cc8d7f6cf57c5edee6485a40d0
|
||||||
|
size 7241091
|
@ -1,26 +1,27 @@
|
|||||||
From c588b0b65658821e6dbc6887ee07637a64d9c037 Mon Sep 17 00:00:00 2001
|
From 26de08de6f27a5fe5fc6aaeee0ebedf40626ab04 Mon Sep 17 00:00:00 2001
|
||||||
From: Egbert Eich <eich@freedesktop.org>
|
From: Tobias Johannes Klausmann <tobias.johannes.klausmann@mni.thm.de>
|
||||||
Date: Fri, 10 Jun 2011 07:59:21 +0200
|
Date: Fri, 20 Apr 2012 11:52:31 +0200
|
||||||
Subject: [PATCH] [SWrast, BindTexImage] Fix crash in swrast when setting a texture for a pixmap.
|
Subject: [PATCH] When glXBindTexImageEXT is called and SWrast is used there
|
||||||
Patch-mainline: To be upstreamed
|
will be a crash when sPriv->swrast_loader->getImage() is
|
||||||
|
called from swrastSetTexBuffer2(). Reason: no memory has
|
||||||
When glXBindTexImageEXT is called and SWrast is used there will be a crash
|
been allocated for the destination thus texImage->Data is
|
||||||
when sPriv->swrast_loader->getImage() is called from swrastSetTexBuffer2().
|
NULL. Call ctx->Driver.TexImage2D() to initialize this. If
|
||||||
Reason: no memory has been allocated for the destination thus texImage->Data
|
memory has been allocated in a previous call free it first.
|
||||||
is NULL.
|
|
||||||
Call ctx->Driver.TexImage2D() to initialize this. If memory has been allocated
|
|
||||||
in a previous call free it first.
|
|
||||||
|
|
||||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||||
|
|
||||||
|
for 8.0.1
|
||||||
|
|
||||||
|
Ported to 8.0.2
|
||||||
---
|
---
|
||||||
src/mesa/drivers/dri/swrast/swrast.c | 8 ++++++++
|
src/mesa/drivers/dri/swrast/swrast.c | 8 ++++++++
|
||||||
1 files changed, 8 insertions(+), 0 deletions(-)
|
1 files changed, 8 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
|
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
|
||||||
index 719b406..02a668e 100644
|
index d18dd09..dd7d0c0 100644
|
||||||
--- a/src/mesa/drivers/dri/swrast/swrast.c
|
--- a/src/mesa/drivers/dri/swrast/swrast.c
|
||||||
+++ b/src/mesa/drivers/dri/swrast/swrast.c
|
+++ b/src/mesa/drivers/dri/swrast/swrast.c
|
||||||
@@ -61,6 +61,7 @@
|
@@ -63,6 +63,7 @@
|
||||||
static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
||||||
GLint texture_format, __DRIdrawable *dPriv)
|
GLint texture_format, __DRIdrawable *dPriv)
|
||||||
{
|
{
|
||||||
@ -28,20 +29,20 @@ index 719b406..02a668e 100644
|
|||||||
struct dri_context *dri_ctx;
|
struct dri_context *dri_ctx;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
__DRIscreen *sPriv = dPriv->driScreenPriv;
|
__DRIscreen *sPriv = dPriv->driScreenPriv;
|
||||||
@@ -90,6 +91,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
@@ -93,6 +94,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
||||||
_mesa_init_teximage_fields(&dri_ctx->Base, target, texImage,
|
|
||||||
w, h, 1, 0, internalFormat, texFormat);
|
|
||||||
|
|
||||||
|
_mesa_init_teximage_fields(&dri_ctx->Base, texImage,
|
||||||
|
w, h, 1, 0, internalFormat, texFormat);
|
||||||
|
+
|
||||||
+ if (texImage->Data)
|
+ if (texImage->Data)
|
||||||
+ ctx->Driver.FreeTexImageData(ctx, texImage);
|
+ ctx->Driver.FreeTexImageData(ctx, texImage);
|
||||||
+
|
+
|
||||||
+ ctx->Driver.TexImage2D(ctx, target, 0, internalFormat,
|
+ ctx->Driver.TexImage2D(ctx, target, 0, internalFormat,
|
||||||
+ w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
|
+ w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
|
||||||
+ NULL, &ctx->Unpack, texObj, texImage);
|
+ NULL, &ctx->Unpack, texObj, texImage);
|
||||||
+
|
|
||||||
sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data,
|
sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)swImage->Buffer,
|
||||||
dPriv->loaderPrivate);
|
dPriv->loaderPrivate);
|
||||||
|
|
||||||
--
|
--
|
||||||
1.7.3.4
|
1.7.7
|
||||||
|
|
||||||
|
108
upstream-llvm-patch.diff
Normal file
108
upstream-llvm-patch.diff
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
From fe34006908f1ff99ada34d52c06fd80197e452ec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vinson Lee <vlee@freedesktop.org>
|
||||||
|
Date: Wed, 14 Mar 2012 05:40:52 +0000
|
||||||
|
Subject: gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.
|
||||||
|
|
||||||
|
llvm-3.1svn r152620 refactored the OProfile profiling code.
|
||||||
|
createOProfileJITEventListener was moved from the llvm namespace to the
|
||||||
|
llvm::JITEventListener namespace.
|
||||||
|
|
||||||
|
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
|
||||||
|
Reviewed-by: Brian Paul <brianp@vmware.com>
|
||||||
|
---
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||||
|
index fe7616b..68f8808 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||||
|
@@ -62,7 +62,11 @@
|
||||||
|
extern "C" void
|
||||||
|
lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE)
|
||||||
|
{
|
||||||
|
+#if HAVE_LLVM >= 0x0301
|
||||||
|
+ llvm::unwrap(EE)->RegisterJITEventListener(llvm::JITEventListener::createOProfileJITEventListener());
|
||||||
|
+#else
|
||||||
|
llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener());
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
||||||
|
|
||||||
|
From 1633dcd890d97bd5e4d125d57f2f529f04d14477 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vinson Lee <vlee@freedesktop.org>
|
||||||
|
Date: Tue, 06 Mar 2012 06:00:40 +0000
|
||||||
|
Subject: gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.
|
||||||
|
|
||||||
|
llvm-3.1svn r152043 changes createMCInstPrinter to take an additional
|
||||||
|
MCRegisterInfo argument.
|
||||||
|
|
||||||
|
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
|
||||||
|
Reviewed-by: Brian Paul <brianp@vmware.com>
|
||||||
|
---
|
||||||
|
(limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
|
||||||
|
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
index 11209da..b6849cb 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
@@ -235,7 +235,18 @@ lp_disassemble(const void* func)
|
||||||
|
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if HAVE_LLVM >= 0x0300
|
||||||
|
+#if HAVE_LLVM >= 0x0301
|
||||||
|
+ OwningPtr<const MCRegisterInfo> MRI(T->createMCRegInfo(Triple));
|
||||||
|
+ if (!MRI) {
|
||||||
|
+ debug_printf("error: no register info for target %s\n", Triple.c_str());
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#if HAVE_LLVM >= 0x0301
|
||||||
|
+ OwningPtr<MCInstPrinter> Printer(
|
||||||
|
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
|
||||||
|
+#elif HAVE_LLVM == 0x0300
|
||||||
|
OwningPtr<MCInstPrinter> Printer(
|
||||||
|
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
|
||||||
|
#elif HAVE_LLVM >= 0x0208
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
||||||
|
|
||||||
|
From 4f513002f65c629576252b34efedf3c8c4531dfd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vinson Lee <vlee@freedesktop.org>
|
||||||
|
Date: Tue, 03 Apr 2012 05:14:15 +0000
|
||||||
|
Subject: gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.
|
||||||
|
|
||||||
|
llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter.
|
||||||
|
|
||||||
|
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
|
||||||
|
Reviewed-by: Brian Paul <brianp@vmware.com>
|
||||||
|
---
|
||||||
|
(limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
|
||||||
|
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
index c5afff0..9cf2094 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
@@ -241,11 +241,17 @@ lp_disassemble(const void* func)
|
||||||
|
debug_printf("error: no register info for target %s\n", Triple.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ OwningPtr<const MCInstrInfo> MII(T->createMCInstrInfo());
|
||||||
|
+ if (!MII) {
|
||||||
|
+ debug_printf("error: no instruction info for target %s\n", Triple.c_str());
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_LLVM >= 0x0301
|
||||||
|
OwningPtr<MCInstPrinter> Printer(
|
||||||
|
- T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MRI, *STI));
|
||||||
|
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI));
|
||||||
|
#elif HAVE_LLVM == 0x0300
|
||||||
|
OwningPtr<MCInstPrinter> Printer(
|
||||||
|
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
Loading…
Reference in New Issue
Block a user