From afdb6fd2196e9d86359e10e82ba7c2e72950f42b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 31 Mar 2012 09:25:39 +0100 Subject: [PATCH 1/2] get latest 8.0.2 set of fixes --- .gitignore | 1 + ...ll-dereference-processing-HiZ-buffer.patch | 52 +++++++++++++++++++ mesa.spec | 14 +++-- sources | 2 +- 4 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 0001-intel-fix-null-dereference-processing-HiZ-buffer.patch diff --git a/.gitignore b/.gitignore index c99b51e..1d5484f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ mesa-20100720.tar.bz2 /mesa-20120126.tar.xz /MesaLib-8.0.tar.bz2 /MesaLib-8.0.1.tar.bz2 +/MesaLib-8.0.2.tar.bz2 diff --git a/0001-intel-fix-null-dereference-processing-HiZ-buffer.patch b/0001-intel-fix-null-dereference-processing-HiZ-buffer.patch new file mode 100644 index 0000000..7c507b2 --- /dev/null +++ b/0001-intel-fix-null-dereference-processing-HiZ-buffer.patch @@ -0,0 +1,52 @@ +From 89e796aef5ca1b35ca4ff6fce9231b4125e07037 Mon Sep 17 00:00:00 2001 +From: Dylan Noblesmith +Date: Fri, 16 Mar 2012 18:38:49 +0000 +Subject: [PATCH] intel: fix null dereference processing HiZ buffer + +Or technically, a near-null dereference. + +https://bugs.freedesktop.org/show_bug.cgi?id=46303 +https://bugs.freedesktop.org/show_bug.cgi?id=46739 + +NOTE: This is a candidate for the 8.0 branch. + +Reviewed-by: Chad Versace +(cherry picked from commit 8d9decb75f0df564abaf9888d9fc5c77de8059cd) +--- + src/mesa/drivers/dri/intel/intel_context.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c +index d3c0d70..9cdd804 100644 +--- a/src/mesa/drivers/dri/intel/intel_context.c ++++ b/src/mesa/drivers/dri/intel/intel_context.c +@@ -1225,6 +1225,10 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel, + if (!rb) + return; + ++ /* Check if we failed to allocate the depth miptree earlier. */ ++ if (buffer->attachment == __DRI_BUFFER_HIZ && rb->mt == NULL) ++ return; ++ + /* If the renderbuffer's and DRIbuffer's regions match, then continue. */ + if ((buffer->attachment != __DRI_BUFFER_HIZ && + rb->mt && +@@ -1266,6 +1270,7 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel, + * due to failure to allocate new storage. + */ + if (buffer->attachment == __DRI_BUFFER_HIZ) { ++ assert(rb->mt); + intel_miptree_release(&rb->mt->hiz_mt); + } else { + intel_miptree_release(&rb->mt); +@@ -1291,6 +1296,7 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel, + + /* Associate buffer with new storage. */ + if (buffer->attachment == __DRI_BUFFER_HIZ) { ++ assert(rb->mt); + rb->mt->hiz_mt = mt; + } else { + rb->mt = mt; +-- +1.7.7.6 + diff --git a/mesa.spec b/mesa.spec index 567ba38..08da9bc 100644 --- a/mesa.spec +++ b/mesa.spec @@ -29,8 +29,8 @@ Summary: Mesa graphics libraries Name: mesa -Version: 8.0.1 -Release: 9%{?dist} +Version: 8.0.2 +Release: 1%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -45,9 +45,10 @@ Source3: make-git-snapshot.sh #Patch7: mesa-7.1-link-shared.patch Patch8: mesa-7.10-llvmcore.patch Patch9: mesa-8.0-llvmpipe-shmget.patch -Patch10: mesa-8.0.1-git.patch +Patch10: 0001-intel-fix-null-dereference-processing-HiZ-buffer.patch Patch11: mesa-8.0-nouveau-tfp-blacklist.patch + BuildRequires: pkgconfig autoconf automake libtool %if %{with_hardware} BuildRequires: kernel-headers @@ -269,12 +270,12 @@ Requires(postun): /sbin/ldconfig Mesa shared glapi %prep -%setup -q -n Mesa-%{version}%{?snapshot} -b0 -b2 +%setup -q -n Mesa-%{version}%{?snapshot} -b2 #setup -q -n mesa-%{gitdate} -b2 #patch7 -p1 -b .dricore %patch8 -p1 -b .llvmcore %patch9 -p1 -b .shmget -%patch10 -p1 -b .git +%patch10 -p1 -b .intel-hiz-fix %patch11 -p1 -b .nouveau %build @@ -551,6 +552,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sat Mar 31 2012 Dave Airlie 8.0.2-1 +- get latest 8.0.2 set of fixes + * Wed Mar 28 2012 Adam Jackson 8.0.1-9 - Subpackage libglapi instead of abusing -dri-drivers for it to keep minimal disk space minimal. (#807750) diff --git a/sources b/sources index a99602a..8464215 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2 -24eeebf66971809d8f40775a379b36c9 MesaLib-8.0.1.tar.bz2 +a368104e5700707048dc3e8691a9a7a1 MesaLib-8.0.2.tar.bz2 From a3ea44be80dab99ec9fa2df865e021bd92a5d35a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 2 Apr 2012 12:27:19 -0400 Subject: [PATCH 2/2] mesa-8.0.1-fix-16bpp.patch: Fix 16bpp in llvmpipe --- mesa-8.0.1-fix-16bpp.patch | 27 +++++++++++++++++++++++++++ mesa.spec | 14 +++++++------- 2 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 mesa-8.0.1-fix-16bpp.patch diff --git a/mesa-8.0.1-fix-16bpp.patch b/mesa-8.0.1-fix-16bpp.patch new file mode 100644 index 0000000..4e3977b --- /dev/null +++ b/mesa-8.0.1-fix-16bpp.patch @@ -0,0 +1,27 @@ +diff -up Mesa-8.0.1/src/glx/drisw_glx.c.jx Mesa-8.0.1/src/glx/drisw_glx.c +--- Mesa-8.0.1/src/glx/drisw_glx.c.jx 2012-04-02 10:34:23.000000000 -0400 ++++ Mesa-8.0.1/src/glx/drisw_glx.c 2012-04-02 11:44:19.296407735 -0400 +@@ -274,7 +274,9 @@ swrastShmGetImage(__DRIdrawable *read, c + do { + int i; + char *src = ximage->data; +- int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256); ++ int bytes_per_pixel = ((ximage->bits_per_pixel + 7) / 8); ++ int dst_width = align(ximage->width * bytes_per_pixel, ++ 64 * bytes_per_pixel); + + for (i = 0; i < ximage->height; i++) { + memcpy(data, src, ximage->bytes_per_line); +diff -up Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx Mesa-8.0.1/src/mesa/state_tracker/st_manager.c +--- Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx 2012-02-14 18:44:00.000000000 -0500 ++++ Mesa-8.0.1/src/mesa/state_tracker/st_manager.c 2012-04-02 12:02:14.613964417 -0400 +@@ -528,6 +528,9 @@ st_context_teximage(struct st_context_if + if (util_format_get_component_bits(internal_format, + UTIL_FORMAT_COLORSPACE_RGB, 3) > 0) + internalFormat = GL_RGBA; ++ else if (util_format_get_component_bits(internal_format, ++ UTIL_FORMAT_COLORSPACE_RGB, 0) == 5) ++ internalFormat = GL_RGB5; + else + internalFormat = GL_RGB; + diff --git a/mesa.spec b/mesa.spec index 08da9bc..8d2d3fa 100644 --- a/mesa.spec +++ b/mesa.spec @@ -30,7 +30,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 8.0.2 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -47,7 +47,7 @@ Patch8: mesa-7.10-llvmcore.patch Patch9: mesa-8.0-llvmpipe-shmget.patch Patch10: 0001-intel-fix-null-dereference-processing-HiZ-buffer.patch Patch11: mesa-8.0-nouveau-tfp-blacklist.patch - +Patch12: mesa-8.0.1-fix-16bpp.patch BuildRequires: pkgconfig autoconf automake libtool %if %{with_hardware} @@ -277,6 +277,7 @@ Mesa shared glapi %patch9 -p1 -b .shmget %patch10 -p1 -b .intel-hiz-fix %patch11 -p1 -b .nouveau +%patch12 -p1 -b .16bpp %build @@ -349,11 +350,7 @@ done | xargs install -m 0755 -t $RPM_BUILD_ROOT%{_libdir}/dri >& /dev/null || : # strip out undesirable headers pushd $RPM_BUILD_ROOT%{_includedir}/GL -rm -f [a-fh-np-wyz]*.h glf*.h glut*.h -popd - -pushd $RPM_BUILD_ROOT%{_libdir} -rm -f xorg/modules/drivers/modesetting_drv.so +rm -f [vw]*.h popd # man pages @@ -552,6 +549,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Apr 02 2012 Adam Jackson 8.0.2-2 +- mesa-8.0.1-fix-16bpp.patch: Fix 16bpp in llvmpipe + * Sat Mar 31 2012 Dave Airlie 8.0.2-1 - get latest 8.0.2 set of fixes