mesa-8.0.1-fix-16bpp.patch: Fix 16bpp in llvmpipe

This commit is contained in:
Adam Jackson 2012-04-02 12:28:44 -04:00
commit 6be7c45d15
2 changed files with 34 additions and 7 deletions

View File

@ -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;

View File

@ -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 <ajax@redhat.com> 8.0.2-2
- mesa-8.0.1-fix-16bpp.patch: Fix 16bpp in llvmpipe
* Sat Mar 31 2012 Dave Airlie <airlied@redhat.com> 8.0.2-1
- get latest 8.0.2 set of fixes