Accepting request 73243 from home:eeich:branches:X11:XOrg
- u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch: Update this patch closing a giant memory leak. - Replace patches: * add: u_GLX-SWrast-Make-GLX-with-SWrast-enabled-work-on-olde.patch This patch falls back to indirect rendering if SWrast doesn't work with older Xservers as no common configs/visuals can be found. * remove: Mesa_indirect_old_xserver_compatibility.diff this patch is superseded. * rename: 0001-Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch to u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch - Remove: intel-add-gem-string.patch This patch was barking up the wrong tree anyway. As discussed with Martin Grässlin from the Kwin project a patch from the upstream git master has been cherry-picked and added to kdebase4-workspace which makes this patch unneciessary. The patch to Kwin will become obsolete once Kwin is updated, this will be noticed easily in kdebase4-workspace. - Fix the driver directory search path in the spec file. This makes dri_driver_dir.diff obsolete. - Add packaging information for GLES2 devel files. - Add GLES2 support. OBS-URL: https://build.opensuse.org/request/show/73243 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=154
This commit is contained in:
parent
b2906fd9b8
commit
5f49dc1836
@ -1,34 +0,0 @@
|
||||
From 761ca4b98dfe7440402aa8e24defc2c881975f07 Mon Sep 17 00:00:00 2001
|
||||
From: Egbert Eich <eich@suse.de>
|
||||
Date: Fri, 5 Nov 2010 08:00:12 +0100
|
||||
Subject: [PATCH] Fix crash in swrast when setting a texture for a pixmap.
|
||||
|
||||
When getImage() is called in swrastSetTexBuffer2() there will be
|
||||
a crash somewhere down the line since texImage->Data isn't initialized
|
||||
which holds a pointer to the destination.
|
||||
To initialize texImage->Data we call ctx->Driver.TexImage2D().
|
||||
---
|
||||
Mesa-7.9/src/mesa/drivers/dri/swrast/swrast.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
--- Mesa-7.9.801-32218e4/src/mesa/drivers/dri/swrast/swrast.c.orig 2010-12-16 15:53:09.000000000 +0100
|
||||
+++ Mesa-7.9.801-32218e4/src/mesa/drivers/dri/swrast/swrast.c 2010-12-20 15:48:03.000000000 +0100
|
||||
@@ -61,6 +61,7 @@
|
||||
static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
||||
GLint texture_format, __DRIdrawable *dPriv)
|
||||
{
|
||||
+ GET_CURRENT_CONTEXT(ctx);
|
||||
struct dri_context *dri_ctx;
|
||||
int x, y, w, h;
|
||||
__DRIscreen *sPriv = dPriv->driScreenPriv;
|
||||
@@ -90,6 +91,10 @@ static void swrastSetTexBuffer2(__DRIcon
|
||||
_mesa_init_teximage_fields(&dri_ctx->Base, target, texImage,
|
||||
w, h, 1, 0, internalFormat, texFormat);
|
||||
|
||||
+ ctx->Driver.TexImage2D(ctx, target, 0, internalFormat,
|
||||
+ w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
|
||||
+ NULL, &ctx->Unpack, texObj, texImage);
|
||||
+
|
||||
sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data,
|
||||
dPriv->loaderPrivate);
|
||||
|
45
Mesa.changes
45
Mesa.changes
@ -1,9 +1,54 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 10 06:10:16 UTC 2011 - eich@suse.de
|
||||
|
||||
- u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch:
|
||||
Update this patch closing a giant memory leak.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 9 11:01:49 UTC 2011 - eich@suse.de
|
||||
|
||||
- Replace patches:
|
||||
* add: u_GLX-SWrast-Make-GLX-with-SWrast-enabled-work-on-olde.patch
|
||||
This patch falls back to indirect rendering if SWrast doesn't work
|
||||
with older Xservers as no common configs/visuals can be found.
|
||||
* remove: Mesa_indirect_old_xserver_compatibility.diff
|
||||
this patch is superseded.
|
||||
* rename: 0001-Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
|
||||
to u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 4 11:20:47 UTC 2011 - eich@suse.de
|
||||
|
||||
- Remove: intel-add-gem-string.patch
|
||||
This patch was barking up the wrong tree anyway.
|
||||
As discussed with Martin Grässlin from the Kwin project
|
||||
a patch from the upstream git master has been cherry-picked
|
||||
and added to kdebase4-workspace which makes this patch unneciessary.
|
||||
The patch to Kwin will become obsolete once Kwin is updated,
|
||||
this will be noticed easily in kdebase4-workspace.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 24 19:49:12 UTC 2011 - eich@suse.de
|
||||
|
||||
- Fix the driver directory search path in the spec file.
|
||||
This makes dri_driver_dir.diff obsolete.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 19 18:10:53 UTC 2011 - idoenmez@novell.com
|
||||
|
||||
- Add intel-add-gem-string.patch: Add back "GEM" string to Intel
|
||||
driver's version output to fix OpenGL effects in kwin.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 17 07:31:21 UTC 2011 - eich@suse.de
|
||||
|
||||
- Add packaging information for GLES2 devel files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 16 18:23:39 UTC 2011 - eich@suse.de
|
||||
|
||||
- Add GLES2 support.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 6 16:46:21 UTC 2011 - mhopf@novell.com
|
||||
|
||||
|
27
Mesa.spec
27
Mesa.spec
@ -17,7 +17,7 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define enable_nouveau 1
|
||||
%define enable_nouveau_gallium 1
|
||||
%define enable_radeon_gallium 1
|
||||
|
||||
%define _version 7.10.2
|
||||
@ -50,13 +50,10 @@ Source2: baselibs.conf
|
||||
Source3: README.updates
|
||||
Source4: manual-pages.tar.bz2
|
||||
Source5: drirc
|
||||
# add update path for dri drivers
|
||||
Patch1: dri_driver_dir.diff
|
||||
Patch2: intel-add-gem-string.patch
|
||||
# to be upstreamed
|
||||
Patch8: egl-buildfix.diff
|
||||
Patch9: Mesa_indirect_old_xserver_compatibility.diff
|
||||
Patch11: 0001-Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
|
||||
Patch9: u_GLX-SWrast-Make-GLX-with-SWrast-enabled-work-on-olde.patch
|
||||
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
|
||||
# already upstream
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -144,12 +141,8 @@ rm -rf src/glut progs/{demos,redbook,samples,xdemos,glsl}
|
||||
rm -f include/GL/{glut.h,uglglutshapes.h,glutf90.h}
|
||||
# remove some docs
|
||||
rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
%patch1
|
||||
%patch2
|
||||
sed -i 's/REPLACE/%_lib/g' src/glx/Makefile
|
||||
sed -i 's/REPLACE/%_lib/g' src/egl/drivers/dri2/Makefile
|
||||
%patch8
|
||||
%patch9 -p0
|
||||
%patch9 -p1
|
||||
%patch11 -p1
|
||||
|
||||
%build
|
||||
@ -161,14 +154,16 @@ export TALLOC_CFLAGS="-I/usr/include"
|
||||
autoreconf -fi
|
||||
### libGL (disable savage/mga, bnc #402132/#403071; reenable mga, bnc #466635)
|
||||
%configure --disable-glw \
|
||||
--enable-gles2 \
|
||||
--with-driver=dri \
|
||||
--with-dri-searchpath=/usr/%{_lib}/dri/updates:/usr/%{_lib}/dri \
|
||||
%ifarch %ix86 x86_64
|
||||
%if 0%{?suse_version} >= 1130
|
||||
--with-dri-drivers=i810,i915,i965,mach64,r128,r200,r300,r600,radeon,sis,tdfx,unichrome,swrast,nouveau,mga \
|
||||
%else
|
||||
--with-dri-drivers=i810,i915,i965,mach64,r128,r200,r300,r600,radeon,sis,tdfx,unichrome,swrast \
|
||||
%endif
|
||||
%if %enable_nouveau
|
||||
%if %enable_nouveau_gallium
|
||||
--enable-gallium-nouveau \
|
||||
%endif
|
||||
%if %enable_radeon_gallium
|
||||
@ -182,7 +177,7 @@ autoreconf -fi
|
||||
%else
|
||||
--with-dri-drivers=i810,i915,i965,mach64,r128,r200,r300,r600,radeon,tdfx,unichrome,swrast \
|
||||
%endif
|
||||
%if %enable_nouveau
|
||||
%if %enable_nouveau_gallium
|
||||
--enable-gallium-nouveau \
|
||||
%endif
|
||||
%endif
|
||||
@ -249,6 +244,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%defattr(-,root,root)
|
||||
%doc docs/*.html docs/*.spec
|
||||
%{_includedir}/GL
|
||||
%{_includedir}/GLES
|
||||
%{_includedir}/GLES2
|
||||
%{_includedir}/EGL
|
||||
%{_includedir}/KHR
|
||||
%exclude %{_includedir}/GL/glew.h
|
||||
@ -258,10 +255,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/libGLU.so
|
||||
%{_libdir}/libOSMesa.so
|
||||
%{_libdir}/libEGL.so
|
||||
%{_libdir}/libGLESv1_CM.so
|
||||
%{_libdir}/libGLESv2.so
|
||||
%{_libdir}/pkgconfig/dri.pc
|
||||
%{_libdir}/pkgconfig/egl.pc
|
||||
%{_libdir}/pkgconfig/gl.pc
|
||||
%{_libdir}/pkgconfig/glu.pc
|
||||
%{_libdir}/pkgconfig/glesv1_cm.pc
|
||||
%{_libdir}/pkgconfig/glesv2.pc
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files nouveau3d
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- src/glx/glxext.c.orig 2010-08-29 00:02:42.000000000 +0200
|
||||
+++ src/glx/glxext.c 2010-08-29 04:35:37.000000000 +0200
|
||||
@@ -858,9 +858,11 @@ __glXInitialize(Display * dpy)
|
||||
dpyPriv->dri2Display = dri2CreateDisplay(dpy);
|
||||
dpyPriv->driDisplay = driCreateDisplay(dpy);
|
||||
}
|
||||
+#if 0
|
||||
if (glx_direct)
|
||||
dpyPriv->driswDisplay = driswCreateDisplay(dpy);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifdef GLX_USE_APPLEGL
|
||||
if (!applegl_create_display(dpyPriv)) {
|
@ -1,22 +0,0 @@
|
||||
--- src/egl/drivers/dri2/Makefile.orig 2010-08-29 00:00:43.000000000 +0200
|
||||
+++ src/egl/drivers/dri2/Makefile 2010-08-29 04:25:53.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/src/mapi \
|
||||
- -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
|
||||
+ -DDEFAULT_DRIVER_DIR=\"/usr/REPLACE/dri/updates:/usr/REPLACE/dri\" \
|
||||
$(XCB_DRI2_CFLAGS) \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
$(LIBDRM_CFLAGS)
|
||||
--- src/glx/Makefile.orig 2010-08-29 00:02:39.000000000 +0200
|
||||
+++ src/glx/Makefile 2010-08-29 04:30:33.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
endif
|
||||
|
||||
EXTRA_DEFINES = $(EXTRA_DEFINES_XF86VIDMODE) -D_REENTRANT \
|
||||
- -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
|
||||
+ -DDEFAULT_DRIVER_DIR=\"/usr/REPLACE/dri/updates:/usr/REPLACE/dri\"
|
||||
|
||||
SOURCES = \
|
||||
clientattrib.c \
|
@ -1,24 +0,0 @@
|
||||
Reverts http://cgit.freedesktop.org/mesa/mesa/commit/?h=7.10&id=b0a7492aebeb4517346f0da2362d6991a7385b59
|
||||
because it breaks kwin, see http://blog.martin-graesslin.com/blog/2011/04/why-blur-does-not-work-in-kubuntu-natty-with-intel/
|
||||
|
||||
|
||||
--- src/mesa/drivers/dri/intel/intel_context.c 2011-03-01 22:35:03.000000000 +0100
|
||||
+++ src/mesa/drivers/dri/intel/intel_context.c 2011-04-20 11:03:25.982000309 +0200
|
||||
@@ -61,6 +61,8 @@
|
||||
int INTEL_DEBUG = (0);
|
||||
#endif
|
||||
|
||||
+#define DRIVER_DATE "20100330 DEVELOPMENT"
|
||||
+#define DRIVER_DATE_GEM "GEM " DRIVER_DATE
|
||||
|
||||
static const GLubyte *
|
||||
intelGetString(struct gl_context * ctx, GLenum name)
|
||||
@@ -178,7 +180,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
- (void) driGetRendererString(buffer, chipset, "", 0);
|
||||
+ (void) driGetRendererString(buffer, chipset, DRIVER_DATE_GEM, 0);
|
||||
return (GLubyte *) buffer;
|
||||
|
||||
default:
|
47
u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
Normal file
47
u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From c588b0b65658821e6dbc6887ee07637a64d9c037 Mon Sep 17 00:00:00 2001
|
||||
From: Egbert Eich <eich@freedesktop.org>
|
||||
Date: Fri, 10 Jun 2011 07:59:21 +0200
|
||||
Subject: [PATCH] [SWrast, BindTexImage] Fix crash in swrast when setting a texture for a pixmap.
|
||||
Patch-mainline: To be upstreamed
|
||||
|
||||
When glXBindTexImageEXT is called and SWrast is used there will be a crash
|
||||
when sPriv->swrast_loader->getImage() is called from swrastSetTexBuffer2().
|
||||
Reason: no memory has been allocated for the destination thus texImage->Data
|
||||
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>
|
||||
---
|
||||
src/mesa/drivers/dri/swrast/swrast.c | 8 ++++++++
|
||||
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
|
||||
index 719b406..02a668e 100644
|
||||
--- a/src/mesa/drivers/dri/swrast/swrast.c
|
||||
+++ b/src/mesa/drivers/dri/swrast/swrast.c
|
||||
@@ -61,6 +61,7 @@
|
||||
static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
||||
GLint texture_format, __DRIdrawable *dPriv)
|
||||
{
|
||||
+ GET_CURRENT_CONTEXT(ctx);
|
||||
struct dri_context *dri_ctx;
|
||||
int x, y, w, h;
|
||||
__DRIscreen *sPriv = dPriv->driScreenPriv;
|
||||
@@ -90,6 +91,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
||||
_mesa_init_teximage_fields(&dri_ctx->Base, target, texImage,
|
||||
w, h, 1, 0, internalFormat, texFormat);
|
||||
|
||||
+ if (texImage->Data)
|
||||
+ ctx->Driver.FreeTexImageData(ctx, texImage);
|
||||
+
|
||||
+ ctx->Driver.TexImage2D(ctx, target, 0, internalFormat,
|
||||
+ w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
|
||||
+ NULL, &ctx->Unpack, texObj, texImage);
|
||||
+
|
||||
sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data,
|
||||
dPriv->loaderPrivate);
|
||||
|
||||
--
|
||||
1.7.3.4
|
||||
|
32
u_GLX-SWrast-Make-GLX-with-SWrast-enabled-work-on-olde.patch
Normal file
32
u_GLX-SWrast-Make-GLX-with-SWrast-enabled-work-on-olde.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From bb5ac44693cc6a50de068c729a089b7bdd6db4cd Mon Sep 17 00:00:00 2001
|
||||
From: Egbert Eich <eich@freedesktop.org>
|
||||
Date: Thu, 9 Jun 2011 12:42:59 +0200
|
||||
Subject: [PATCH] [GLX/SWrast] Make GLX with SWrast enabled work on older Xservers.
|
||||
Patch-mainline: To be upstreamed
|
||||
|
||||
Older Xservers don't offer a set of configs/visuals that is compatible
|
||||
with DRI. If no visuals or configs are found let driswCreateScreen()
|
||||
fail so that the next fallback path is take.
|
||||
|
||||
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
||||
---
|
||||
src/glx/drisw_glx.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
|
||||
index 2eaa3c5..7bf29af 100644
|
||||
--- a/src/glx/drisw_glx.c
|
||||
+++ b/src/glx/drisw_glx.c
|
||||
@@ -490,6 +490,9 @@ driswCreateScreen(int screen, struct glx_display *priv)
|
||||
psc->base.visuals =
|
||||
driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
|
||||
|
||||
+ if (psc->base.configs == NULL || psc->base.visuals == NULL)
|
||||
+ goto handle_error;
|
||||
+
|
||||
psc->driver_configs = driver_configs;
|
||||
|
||||
psc->base.vtable = &drisw_screen_vtable;
|
||||
--
|
||||
1.7.3.4
|
||||
|
Loading…
Reference in New Issue
Block a user