From 2d0b0526f5a6b67d8348f3c11aa9a34639ba69a3c1edb9bc8847dd5ff2b795a5 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 20 Apr 2012 14:33:41 +0000 Subject: [PATCH] Accepting request 114850 from home:klausi123:X11 Updatet to mesa-8.0.2 rebased the needed patches on top of 8.0.2 maybe you want to pull my package "llvm-stable" for now, or revert llvm to 3.0, because llvm 3.0.99 breaks mesa right now OBS-URL: https://build.opensuse.org/request/show/114850 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=208 --- Mesa-nodate.diff | 23 +++-- Mesa.spec | 12 ++- MesaLib-8.0.1.tar.bz2 | 3 - ...m-rtasm-properly-detect-SSE-and-SSE2.patch | 85 ------------------- mesa-8.0.2.tar.gz | 3 + ...ast-when-setting-a-texture-for-a-pix.patch | 47 +++++----- 6 files changed, 50 insertions(+), 123 deletions(-) delete mode 100644 MesaLib-8.0.1.tar.bz2 delete mode 100644 U_gallium-rtasm-properly-detect-SSE-and-SSE2.patch create mode 100644 mesa-8.0.2.tar.gz diff --git a/Mesa-nodate.diff b/Mesa-nodate.diff index 8dec3dd..ea1a1da 100644 --- a/Mesa-nodate.diff +++ b/Mesa-nodate.diff @@ -1,8 +1,18 @@ -Index: Mesa-7.11.1/src/mesa/main/es_generator.py -=================================================================== ---- Mesa-7.11.1.orig/src/mesa/main/es_generator.py 2011-11-17 20:45:06.000000000 +0100 -+++ Mesa-7.11.1/src/mesa/main/es_generator.py 2012-03-01 09:27:01.392009165 +0100 -@@ -182,9 +182,8 @@ print """/* DO NOT EDIT **************** +From da91936f74e4195fbb3ed4da0eaecb9f1ec66972 Mon Sep 17 00:00:00 2001 +From: Tobias Johannes Klausmann +Date: Fri, 20 Apr 2012 14:09:50 +0200 +Subject: [PATCH] PATCH-FIX-OPENSUSE do not put dates in sources to fix + 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 * API specification file: %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. print """ +-- +1.7.7 + diff --git a/Mesa.spec b/Mesa.spec index 4da4058..ddef3b1 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -17,10 +17,11 @@ # -%define _version 8.0.1 +%define _version 8.0.2 +%define _name_archive mesa Name: Mesa -Version: 8.0.1 +Version: 8.0.2 Release: 0 BuildRequires: autoconf >= 2.59 BuildRequires: automake @@ -75,7 +76,7 @@ Provides: XFree86-Mesa-64bit = %{version} Summary: System for rendering interactive 3-D graphics License: MIT Group: System/Libraries -Source: MesaLib-%{_version}.tar.bz2 +Source: %{_name_archive}-%{_version}.tar.gz Source2: baselibs.conf Source3: README.updates Source4: manual-pages.tar.bz2 @@ -85,8 +86,6 @@ Source6: %name-rpmlintrc Patch1: Mesa-nodate.diff # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch -# already upstream -Patch12: U_gallium-rtasm-properly-detect-SSE-and-SSE2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -359,7 +358,7 @@ functions. It is intended to be mainly used by the Mesa-libGLES* packages. %prep -%setup -n %{name}-%{_version} -b4 -q +%setup -n %{_name_archive}-%{_version} -b4 -q %patch1 -p1 # no need to build (GLUT-)Demos rm -rf src/glut progs/{demos,redbook,samples,xdemos,glsl} @@ -368,7 +367,6 @@ rm -f include/GL/{glut.h,uglglutshapes.h,glutf90.h} # remove some docs rm -rf docs/README.{VMS,WIN32,OS2} #%patch11 -p1 -%patch12 -p1 %build diff --git a/MesaLib-8.0.1.tar.bz2 b/MesaLib-8.0.1.tar.bz2 deleted file mode 100644 index 9db5ee2..0000000 --- a/MesaLib-8.0.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:593af02ea2b5b7afb057a12c550f2c03b1d1cf59a716972d601c1499545ea0a7 -size 5694019 diff --git a/U_gallium-rtasm-properly-detect-SSE-and-SSE2.patch b/U_gallium-rtasm-properly-detect-SSE-and-SSE2.patch deleted file mode 100644 index e3c6900..0000000 --- a/U_gallium-rtasm-properly-detect-SSE-and-SSE2.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 74d303521e6ba41d1cbeb75edb2f834ebbe8c550 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= -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 - diff --git a/mesa-8.0.2.tar.gz b/mesa-8.0.2.tar.gz new file mode 100644 index 0000000..f56a6be --- /dev/null +++ b/mesa-8.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dedddfcbd2b72031db2debe12a3088f47d8036cc8d7f6cf57c5edee6485a40d0 +size 7241091 diff --git a/u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch b/u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch index 0702f0c..2907531 100644 --- a/u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch +++ b/u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch @@ -1,26 +1,27 @@ -From c588b0b65658821e6dbc6887ee07637a64d9c037 Mon Sep 17 00:00:00 2001 -From: Egbert Eich -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. +From 26de08de6f27a5fe5fc6aaeee0ebedf40626ab04 Mon Sep 17 00:00:00 2001 +From: Tobias Johannes Klausmann +Date: Fri, 20 Apr 2012 11:52:31 +0200 +Subject: [PATCH] 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 + +for 8.0.1 + +Ported to 8.0.2 --- 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 +index d18dd09..dd7d0c0 100644 --- a/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, GLint texture_format, __DRIdrawable *dPriv) { @@ -28,20 +29,20 @@ index 719b406..02a668e 100644 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); +@@ -93,6 +94,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, + _mesa_init_teximage_fields(&dri_ctx->Base, texImage, + w, h, 1, 0, internalFormat, texFormat); ++ + if (texImage->Data) -+ ctx->Driver.FreeTexImageData(ctx, texImage); -+ ++ 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); + sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)swImage->Buffer, + dPriv->loaderPrivate); -- -1.7.3.4 +1.7.7