From 1f59b048fd66eaee1e7617266fcca18dda74423e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 3 Nov 2011 15:51:35 -0400 Subject: [PATCH] mesa-7.11-fix-sw-24bpp.patch: Fix software rendering in 24bpp. --- mesa-7.11-fix-sw-24bpp.patch | 32 ++++++++++++++++++++++++++++++++ mesa.spec | 7 ++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 mesa-7.11-fix-sw-24bpp.patch diff --git a/mesa-7.11-fix-sw-24bpp.patch b/mesa-7.11-fix-sw-24bpp.patch new file mode 100644 index 0000000..30f485a --- /dev/null +++ b/mesa-7.11-fix-sw-24bpp.patch @@ -0,0 +1,32 @@ +From 4258e9b3a5eeaa90f2a0485576d7d17d6d8e4d6f Mon Sep 17 00:00:00 2001 +From: Marc Pignat +Date: Tue, 28 Jun 2011 13:21:58 +0000 +Subject: drisw: Fix 24bpp software rendering, take 2 + +This patch add the support for 24bpp in the dri/swrast implementation. +See http://bugs.freedesktop.org/show_bug.cgi?id=23525 + +Signed-off-by: Marc Pignat +Signed-off-by: Brian Paul +(cherry picked from commit cfec000e7514342fd51859906e173ba2d474a55c) +--- +diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c +index 07d4955..a57b327 100644 +--- a/src/glx/drisw_glx.c ++++ b/src/glx/drisw_glx.c +@@ -100,6 +100,13 @@ XCreateDrawable(struct drisw_drawable * pdp, + 32, /* bitmap_pad */ + 0); /* bytes_per_line */ + ++ /** ++ * swrast does not handle 24-bit depth with 24 bpp, so let X do the ++ * the conversion for us. ++ */ ++ if (pdp->ximage->bits_per_pixel == 24) ++ pdp->ximage->bits_per_pixel = 32; ++ + return True; + } + +-- +cgit v0.9.0.2-2-gbebe diff --git a/mesa.spec b/mesa.spec index 0759565..f40a6fd 100644 --- a/mesa.spec +++ b/mesa.spec @@ -26,7 +26,7 @@ Summary: Mesa graphics libraries Name: mesa Version: 7.11 -Release: 8%{?dist} +Release: 9%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.mesa3d.org @@ -51,6 +51,7 @@ Patch32: mesa-7.11-generic-wmb.patch Patch33: mesa-7.11-drisw-glx13.patch Patch34: 0001-nv50-fix-max-texture-levels.patch Patch35: mesa-7.11-intel-swap-event.patch +Patch36: mesa-7.11-fix-sw-24bpp.patch BuildRequires: pkgconfig autoconf automake libtool %if %{with_hardware} @@ -228,6 +229,7 @@ Mesa offscreen rendering development package %patch33 -p1 -b .glx13 %patch34 -p1 -b .nv50-texlevel %patch35 -p1 -b .ise +%patch36 -p1 -b .sw24 %build @@ -466,6 +468,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/osmesa.pc %changelog +* Thu Nov 03 2011 Adam Jackson 7.11-9 +- mesa-7.11-fix-sw-24bpp.patch: Fix software rendering in 24bpp. + * Fri Oct 28 2011 Adam Jackson 7.11-8 - mesa-7.11-intel-swap-event.patch: Disable GLX_INTEL_swap_event by default; DRI2 enables it explicitly, but swrast doesn't and oughtn't. (#748747)