SHA256
1
0
forked from pool/Mesa

Accepting request 183076 from home:sumski:branches:X11:XOrg

Update to 9.2 snapshot

OBS-URL: https://build.opensuse.org/request/show/183076
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=293
This commit is contained in:
Stefan Dirsch 2013-07-15 13:37:01 +00:00 committed by Git OBS Bridge
parent 26b4d5c0ee
commit 0e113551f8
7 changed files with 159 additions and 78 deletions

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Fri Jul 5 12:07:10 UTC 2013 - hrvoje.senjan@gmail.com
- Update to 9.2 snapshot:
* New features:
* Mesa 9.2 implements the OpenGL 3.1 API - OpenGL 3.1 is only
available if requested at context creation because
GL_ARB_compatibility is not supported
* GL_ARB_texture_buffer_range
* GL_ARB_texture_multisample
* GL_ARB_texture_storage_multisample
* GL_ARB_texture_query_lod
* Enable GL_ARB_texture_storage on radeon, r200, and nouveau
* Added new freedreno gallium driver
* OSMesa interface for gallium llvmpipe/softpipe drivers
* Gallium Heads-Up Display (HUD) feature for performance monitoring
* Changes:
* Removed d3d1x state tracker (unused, unmaintained and broken)
* Removed GL_EXT_clip_volume_hint because no driver had enabled
it since 2007.
* Removed GL_MESA_resize_buffers because it was only really
implemented by the (unsupported) GDI driver.
* GL_EXT_separate_shader_objects has been removed from all Gallium
drivers, because it disallows a critical GLSL shader optimization.
GL_ARB_separate_shader_objects doesn't have this issue.
- Unlock radeonsi libvdpau
- Enable gallium egl
- added U_gallium-egl-gbm-use-wayland-cflags.patch, needed so gbm
uses pkgconfig flags, instead of relying on "common" wayland dir
- Added llvm_r600 define, for enableing llvm shared-libs and
r600-llvm-compiler. Off for now, until we have fixed llvm
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 2 13:00:05 UTC 2013 - hrvoje.senjan@gmail.com Tue Jul 2 13:00:05 UTC 2013 - hrvoje.senjan@gmail.com

137
Mesa.spec
View File

@ -17,11 +17,14 @@
%define glamor 1 %define glamor 1
%define _version 9.1.4 %define egl_gallium 1
%define _name_archive MesaLib %define llvm_r600 0
%define _version 9.1.98.01
%define _name_archive mesa
Name: Mesa Name: Mesa
Version: 9.1.4 Version: 9.1.98.01
Release: 0 Release: 0
BuildRequires: autoconf >= 2.60 BuildRequires: autoconf >= 2.60
BuildRequires: automake BuildRequires: automake
@ -29,6 +32,9 @@ BuildRequires: bison
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: flex BuildRequires: flex
BuildRequires: gcc-c++ BuildRequires: gcc-c++
%if %llvm_r600
BuildRequires: libelf-devel
%endif
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: libtalloc-devel BuildRequires: libtalloc-devel
BuildRequires: libtool BuildRequires: libtool
@ -38,10 +44,10 @@ BuildRequires: python-base
BuildRequires: xorg-x11-util-devel BuildRequires: xorg-x11-util-devel
BuildRequires: pkgconfig(libdrm) >= 2.4.24 BuildRequires: pkgconfig(libdrm) >= 2.4.24
%ifarch x86_64 %ix86 %ifarch x86_64 %ix86
BuildRequires: pkgconfig(libdrm_intel) >= 2.4.34 BuildRequires: pkgconfig(libdrm_intel) >= 2.4.38
%endif %endif
BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.33 BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.41
BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.40 BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.45
BuildRequires: pkgconfig(libkms) >= 1.0.0 BuildRequires: pkgconfig(libkms) >= 1.0.0
BuildRequires: pkgconfig(libudev) > 150 BuildRequires: pkgconfig(libudev) > 150
%if 0%{?suse_version} >= 1230 %if 0%{?suse_version} >= 1230
@ -56,12 +62,12 @@ BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xfixes) BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xxf86vm) BuildRequires: pkgconfig(xxf86vm)
BuildRequires: pkgconfig(zlib)
%ifarch %arm %ix86 x86_64 %ifarch %arm %ix86 x86_64
BuildRequires: llvm-devel BuildRequires: llvm-devel
%endif %endif
BuildRequires: libXvMC-devel BuildRequires: libXvMC-devel
BuildRequires: libvdpau-devel BuildRequires: libvdpau-devel
BuildRequires: zlib-devel
Url: http://www.mesa3d.org Url: http://www.mesa3d.org
Provides: Mesa7 = %{version} Provides: Mesa7 = %{version}
@ -82,7 +88,8 @@ Provides: XFree86-Mesa-64bit = %{version}
Summary: System for rendering interactive 3-D graphics Summary: System for rendering interactive 3-D graphics
License: MIT License: MIT
Group: System/Libraries Group: System/Libraries
Source: ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{_name_archive}-%{version}.tar.bz2 #Source: ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{_name_archive}-%{version}.tar.bz2
Source: %{_name_archive}-%{version}.tar.bz2
Source2: baselibs.conf Source2: baselibs.conf
Source3: README.updates Source3: README.updates
Source4: manual-pages.tar.bz2 Source4: manual-pages.tar.bz2
@ -92,10 +99,12 @@ Source6: %name-rpmlintrc
Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch
# Patch from Fedora, fix 16bpp in llvmpipe # Patch from Fedora, fix 16bpp in llvmpipe
Patch13: u_mesa-8.0.1-fix-16bpp.patch Patch13: u_mesa-8.0.1-fix-16bpp.patch
# Patch to fix glapi_dispatch include # Patch to fix glapi_dispatch include
Patch14: u_mesa-glapi_dispatch.patch Patch14: u_mesa-glapi_dispatch.patch
# Patch from Fedora, use shmget when available, under llvmpipe # Patch from Fedora, use shmget when available, under llvmpipe
Patch15: u_mesa-8.0-llvmpipe-shmget.patch Patch15: u_mesa-8.0-llvmpipe-shmget.patch
# PATCH-FIX-UPSTREAM gallium-egl-gbm-use-wayland-cflags.patch -- use pkgconfig for finding wayland
Patch16: U_gallium-egl-gbm-use-wayland-cflags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -346,7 +355,7 @@ Group: Development/Libraries/C and C++
Requires: Mesa-libglapi0 = %version Requires: Mesa-libglapi0 = %version
%description -n Mesa-libglapi-devel %description -n Mesa-libglapi-devel
Development files for the Mesa GL API module which is responsible for Development files for the Mesa GL API module which is responsible for
dispatching all the gl* functions. It is intended to be mainly used by dispatching all the gl* functions. It is intended to be mainly used by
the Mesa-libGLES* packages. the Mesa-libGLES* packages.
@ -417,7 +426,7 @@ Release: 0
%description -n libxatracker1 %description -n libxatracker1
This package contains the XA state tracker for gallium3D driver. This package contains the XA state tracker for gallium3D driver.
It superseeds the Xorg state tracker and provides an infrastructure It superseeds the Xorg state tracker and provides an infrastructure
to accelerate Xorg 2D operations. It is currently used by vmwgfx to accelerate Xorg 2D operations. It is currently used by vmwgfx
video driver. video driver.
%package -n libxatracker-devel %package -n libxatracker-devel
@ -430,7 +439,7 @@ Requires: libxatracker1 = %version
%description -n libxatracker-devel %description -n libxatracker-devel
This package contains the XA state tracker for gallium3D driver. This package contains the XA state tracker for gallium3D driver.
It superseeds the Xorg state tracker and provides an infrastructure It superseeds the Xorg state tracker and provides an infrastructure
to accelerate Xorg 2D operations. It is currently used by vmwgfx to accelerate Xorg 2D operations. It is currently used by vmwgfx
video driver. video driver.
This package provides the development environment for compiling This package provides the development environment for compiling
@ -450,7 +459,7 @@ Summary: XVMC state tracker for R300
Group: System/Libraries Group: System/Libraries
%description -n libXvMC_r300 %description -n libXvMC_r300
This package contains the XvMC state tracker for R300. This is This package contains the XvMC state tracker for R300. This is
still "work in progress", i.e. expect poor video quality, choppy still "work in progress", i.e. expect poor video quality, choppy
videos and artefacts all over. videos and artefacts all over.
@ -459,7 +468,7 @@ Summary: XVMC state tracker for R600
Group: System/Libraries Group: System/Libraries
%description -n libXvMC_r600 %description -n libXvMC_r600
This package contains the XvMC state tracker for R600. This is This package contains the XvMC state tracker for R600. This is
still "work in progress", i.e. expect poor video quality, choppy still "work in progress", i.e. expect poor video quality, choppy
videos and artefacts all over. videos and artefacts all over.
@ -486,7 +495,7 @@ Summary: XVMC state tracker for R300
Group: System/Libraries Group: System/Libraries
%description -n libvdpau_r300 %description -n libvdpau_r300
This package contains the VDPAU state tracker for R300. This is This package contains the VDPAU state tracker for R300. This is
still "work in progress", i.e. expect poor video quality, choppy still "work in progress", i.e. expect poor video quality, choppy
videos and artefacts all over. videos and artefacts all over.
@ -495,18 +504,20 @@ Summary: XVMC state tracker for R600
Group: System/Libraries Group: System/Libraries
%description -n libvdpau_r600 %description -n libvdpau_r600
This package contains the VDPAU state tracker for R600. This is This package contains the VDPAU state tracker for R600. This is
still "work in progress", i.e. expect poor video quality, choppy still "work in progress", i.e. expect poor video quality, choppy
videos and artefacts all over. videos and artefacts all over.
#%package -n libvdpau_radeonsi %if %llvm_r600
#Summary: XVMC state tracker for radeonsi %package -n libvdpau_radeonsi
#Group: System/Libraries Summary: XVMC state tracker for radeonsi
Group: System/Libraries
#%description -n libvdpau_radeonsi %description -n libvdpau_radeonsi
#This package contains the VDPAU state tracker for radeonsi. This is This package contains the VDPAU state tracker for radeonsi. This is
#still "work in progress", i.e. expect poor video quality, choppy still "work in progress", i.e. expect poor video quality, choppy
#videos and artefacts all over. videos and artefacts all over.
%endif
%package -n libvdpau_softpipe %package -n libvdpau_softpipe
Summary: Software implementation of XVMC state tracker Summary: Software implementation of XVMC state tracker
@ -518,13 +529,16 @@ state tracker. This is still "work in progress", i.e. expect
poor video quality, choppy videos and artefacts all over. poor video quality, choppy videos and artefacts all over.
%prep %prep
%setup -n %{name}-%{_version} -b4 -q %setup -n %{_name_archive}-%{_version} -b4 -q
# remove some docs # remove some docs
rm -rf docs/README.{VMS,WIN32,OS2} rm -rf docs/README.{VMS,WIN32,OS2}
#%patch11 -p1 #%patch11 -p1
%patch13 -p1 %patch13 -p1
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%if %egl_gallium
%patch16 -p1
%endif
%build %build
@ -550,13 +564,22 @@ autoreconf -fi
%if %glamor %if %glamor
--enable-gbm \ --enable-gbm \
--enable-glx-tls \ --enable-glx-tls \
%endif
%if %egl_gallium
--enable-gallium-egl \
%endif %endif
--with-dri-searchpath=/usr/%{_lib}/dri/updates:/usr/%{_lib}/dri \ --with-dri-searchpath=/usr/%{_lib}/dri/updates:/usr/%{_lib}/dri \
%ifarch %ix86 x86_64 %ifarch %ix86 x86_64
--enable-xa \ --enable-xa \
--enable-gallium-llvm \ --enable-gallium-llvm \
--with-dri-drivers=i915,i965,nouveau,r200,radeon \ --with-dri-drivers=i915,i965,nouveau,r200,radeon \
%if %llvm_r600
--with-llvm-shared-libs \
--enable-r600-llvm-compiler \
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,svga \
%else
--with-gallium-drivers=r300,r600,nouveau,swrast,svga \ --with-gallium-drivers=r300,r600,nouveau,swrast,svga \
%endif
--enable-vdpau \ --enable-vdpau \
--enable-xvmc \ --enable-xvmc \
%endif %endif
@ -584,29 +607,29 @@ find $RPM_BUILD_ROOT -name "*.la" -exec rm {} \;
#### ####
make distclean-generic make distclean-generic
%configure --enable-xlib-glx \ %configure --enable-xlib-glx \
--disable-dri \ --disable-dri \
--enable-osmesa \ --enable-osmesa \
--with-egl-platforms=x11 \ --with-egl-platforms=x11 \
--with-gallium-drivers="" \ --with-gallium-drivers="" \
--with-gl-lib-name=IndirectGL \ --with-gl-lib-name=IndirectGL \
CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
make %{?_smp_mflags} make %{?_smp_mflags}
cp -a \ cp -a \
src/mesa/drivers/x11/.libs/libIndirectGL.so* \ src/mesa/drivers/x11/.libs/libIndirectGL.so* \
src/mesa/drivers/osmesa/.libs/libOSMesa.so* \ src/mesa/drivers/osmesa/.libs/libOSMesa.so* \
$RPM_BUILD_ROOT/usr/%{_lib} $RPM_BUILD_ROOT/usr/%{_lib}
install -m 644 src/mesa/drivers/osmesa/osmesa.pc \ install -m 644 src/mesa/drivers/osmesa/osmesa.pc \
$RPM_BUILD_ROOT/usr/%{_lib}/pkgconfig $RPM_BUILD_ROOT/usr/%{_lib}/pkgconfig
for dir in ../xc/doc/man/{GL/gl,GL/glx}; do for dir in ../xc/doc/man/{GL/gl,GL/glx}; do
pushd $dir pushd $dir
xmkmf -a xmkmf -a
make %{?_smp_mflags} make %{?_smp_mflags}
make install.man DESTDIR=$RPM_BUILD_ROOT MANPATH=%{_mandir} LIBMANSUFFIX=3gl make install.man DESTDIR=$RPM_BUILD_ROOT MANPATH=%{_mandir} LIBMANSUFFIX=3gl
popd popd
done done
# DRI driver update mechanism #DRI driver update mechanism
mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/dri/updates mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/dri/updates
install -m 644 $RPM_SOURCE_DIR/README.updates \ install -m 644 $RPM_SOURCE_DIR/README.updates \
$RPM_BUILD_ROOT/usr/%{_lib}/dri/updates $RPM_BUILD_ROOT/usr/%{_lib}/dri/updates
@ -673,8 +696,10 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%post -n libvdpau_r600 %post -n libvdpau_r600
%postun -n libvdpau_r600 %postun -n libvdpau_r600
#%post -n libvdpau_radeonsi %if %llvm_r600
#%postun -n libvdpau_radeonsi %post -n libvdpau_radeonsi
%postun -n libvdpau_radeonsi
%endif
%post -n libvdpau_softpipe %post -n libvdpau_softpipe
%postun -n libvdpau_softpipe %postun -n libvdpau_softpipe
@ -700,6 +725,12 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%doc docs/README* docs/COPYING %doc docs/README* docs/COPYING
%config /etc/drirc %config /etc/drirc
%{_libdir}/dri/ %{_libdir}/dri/
%if %egl_gallium
%dir %_libdir/egl/
%_libdir/egl/egl_gallium.so
%dir %_libdir/gallium-pipe/
%_libdir/gallium-pipe/pipe_*.so
%endif
%_libdir/libdricore9*.so.* %_libdir/libdricore9*.so.*
%files -n Mesa-libEGL1 %files -n Mesa-libEGL1
@ -786,6 +817,10 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%files -n libgbm1 %files -n libgbm1
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libgbm.so.1* %_libdir/libgbm.so.1*
%if %egl_gallium
%dir %_libdir/gbm/
%_libdir/gbm/gbm_gallium_drm.so
%endif
%files -n libgbm-devel %files -n libgbm-devel
%defattr(-,root,root) %defattr(-,root,root)
@ -812,13 +847,13 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%_libdir/libXvMCnouveau.so.1.0.0 %_libdir/libXvMCnouveau.so.1.0.0
%ifarch %ix86 x86_64 %ifarch %ix86 x86_64
%files -n libXvMC_r300 %files -n libXvMC_r300
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libXvMCr300.so %_libdir/libXvMCr300.so
%_libdir/libXvMCr300.so.1 %_libdir/libXvMCr300.so.1
%_libdir/libXvMCr300.so.1.0.0 %_libdir/libXvMCr300.so.1.0.0
%files -n libXvMC_r600 %files -n libXvMC_r600
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libXvMCr600.so %_libdir/libXvMCr600.so
%_libdir/libXvMCr600.so.1 %_libdir/libXvMCr600.so.1
@ -849,11 +884,13 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%_libdir/vdpau/libvdpau_nouveau.so.1 %_libdir/vdpau/libvdpau_nouveau.so.1
%_libdir/vdpau/libvdpau_nouveau.so.1.0.0 %_libdir/vdpau/libvdpau_nouveau.so.1.0.0
#%files -n libvdpau_radeonsi %if %llvm_r600
#%defattr(-,root,root) %files -n libvdpau_radeonsi
#%_libdir/vdpau/libvdpau_radeonsi.so %defattr(-,root,root)
#%_libdir/vdpau/libvdpau_radeonsi.so.1 %_libdir/vdpau/libvdpau_radeonsi.so
#%_libdir/vdpau/libvdpau_radeonsi.so.1.0 %_libdir/vdpau/libvdpau_radeonsi.so.1
%_libdir/vdpau/libvdpau_radeonsi.so.1.0.0
%endif
%files -n libvdpau_softpipe %files -n libvdpau_softpipe
%defattr(-,root,root) %defattr(-,root,root)
@ -872,7 +909,7 @@ install -m 644 $RPM_SOURCE_DIR/drirc $RPM_BUILD_ROOT/etc
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc docs/*.html docs/*.spec %doc docs/*.html
%_includedir/GL/internal %_includedir/GL/internal
%_libdir/libdricore9*.so %_libdir/libdricore9*.so
%_libdir/pkgconfig/dri.pc %_libdir/pkgconfig/dri.pc

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e858786e9e68e79aa245037d351a664f3a5c05ccdbdc2519307bc06f8ee68da
size 6124177

View File

@ -0,0 +1,10 @@
--- Mesa-9.1/src/gallium/state_trackers/gbm/Makefile.am.orig
+++ Mesa-9.1/src/gallium/state_trackers/gbm/Makefile.am
@@ -27,6 +27,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gbm/main \
-I$(top_srcdir)/include
if HAVE_EGL_PLATFORM_WAYLAND
+AM_CPPFLAGS += `pkg-config --cflags wayland-server`
AM_CPPFLAGS += -DHAVE_WAYLAND_PLATFORM
endif

3
mesa-9.1.98.01.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac721fb3baf407465f63a9bd38df780ffcb0a37044e239133b3c13d84df41eb1
size 6154306

View File

@ -1,5 +1,5 @@
diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 5247126..3cdb6eb 100644 index 41f66d5..28beb80 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c --- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -252,8 +252,6 @@ drisw_update_tex_buffer(struct dri_drawable *drawable, @@ -252,8 +252,6 @@ drisw_update_tex_buffer(struct dri_drawable *drawable,
@ -8,15 +8,16 @@ index 5247126..3cdb6eb 100644
int x, y, w, h; int x, y, w, h;
- int ximage_stride, line; - int ximage_stride, line;
- int cpp = util_format_get_blocksize(res->format); - int cpp = util_format_get_blocksize(res->format);
get_drawable_info(dPriv, &x, &y, &w, &h); get_drawable_info(dPriv, &x, &y, &w, &h);
@@ -265,14 +263,6 @@ drisw_update_tex_buffer(struct dri_drawable *drawable, @@ -265,15 +263,6 @@ drisw_update_tex_buffer(struct dri_drawable *drawable,
/* Copy the Drawable content to the mapped texture buffer */ /* Copy the Drawable content to the mapped texture buffer */
get_image(dPriv, x, y, w, h, map); get_image(dPriv, x, y, w, h, map);
- /* The pipe transfer has a pitch rounded up to the nearest 64 pixels. */ - /* The pipe transfer has a pitch rounded up to the nearest 64 pixels.
- ximage_stride = w * cpp; - get_image() has a pitch rounded up to 4 bytes. */
- ximage_stride = ((w * cpp) + 3) & -4;
- for (line = h-1; line; --line) { - for (line = h-1; line; --line) {
- memmove(&map[line * transfer->stride], - memmove(&map[line * transfer->stride],
- &map[line * ximage_stride], - &map[line * ximage_stride],
@ -25,13 +26,14 @@ index 5247126..3cdb6eb 100644
- -
pipe_transfer_unmap(pipe, transfer); pipe_transfer_unmap(pipe, transfer);
} }
diff -up mesa-20120424/src/glx/drisw_glx.c.jx mesa-20120424/src/glx/drisw_glx.c diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
--- mesa-20120424/src/glx/drisw_glx.c.jx 2012-04-24 07:37:03.000000000 -0400 index 832e964..feac747 100644
+++ mesa-20120424/src/glx/drisw_glx.c 2012-05-16 13:29:25.087965268 -0400 --- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -24,6 +24,9 @@ @@ -24,6 +24,9 @@
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
#include <X11/Xlib.h> #include <X11/Xlib.h>
+#include <sys/ipc.h> +#include <sys/ipc.h>
+#include <sys/shm.h> +#include <sys/shm.h>
@ -39,10 +41,10 @@ diff -up mesa-20120424/src/glx/drisw_glx.c.jx mesa-20120424/src/glx/drisw_glx.c
#include "glxclient.h" #include "glxclient.h"
#include <dlfcn.h> #include <dlfcn.h>
#include "dri_common.h" #include "dri_common.h"
@@ -206,6 +209,96 @@ swrastPutImage(__DRIdrawable * draw, int @@ -206,6 +209,96 @@ swrastPutImage(__DRIdrawable * draw, int op,
ximage->data = NULL; ximage->data = NULL;
} }
+static int shm_error; +static int shm_error;
+ +
+static int +static int
@ -138,13 +140,13 @@ diff -up mesa-20120424/src/glx/drisw_glx.c.jx mesa-20120424/src/glx/drisw_glx.c
int x, int y, int w, int h, int x, int y, int w, int h,
@@ -220,11 +313,17 @@ swrastGetImage(__DRIdrawable * read, @@ -220,11 +313,17 @@ swrastGetImage(__DRIdrawable * read,
readable = pread->xDrawable; readable = pread->xDrawable;
ximage = prp->ximage; ximage = prp->ximage;
- ximage->data = data; - ximage->data = data;
ximage->width = w; ximage->width = w;
ximage->height = h; ximage->height = h;
ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32); ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32);
+ /* XXX check dimensions, if any caller ever sub-images */ + /* XXX check dimensions, if any caller ever sub-images */
+ if (swrastShmGetImage(read, data, prp)) + if (swrastShmGetImage(read, data, prp))
+ return; + return;
@ -153,5 +155,5 @@ diff -up mesa-20120424/src/glx/drisw_glx.c.jx mesa-20120424/src/glx/drisw_glx.c
+ ximage->data = data; + ximage->data = data;
+ +
XGetSubImage(dpy, readable, x, y, w, h, ~0L, ZPixmap, ximage, 0, 0); XGetSubImage(dpy, readable, x, y, w, h, ~0L, ZPixmap, ximage, 0, 0);
ximage->data = NULL; ximage->data = NULL;

View File

@ -1,13 +1,13 @@
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 diff --git a/src/mesa/state_tracker/st_manager.c b/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 index 9c2b4d2..660ab16 100644
+++ Mesa-8.0.1/src/mesa/state_tracker/st_manager.c 2012-04-02 12:02:14.613964417 -0400 --- a/src/mesa/state_tracker/st_manager.c
@@ -528,6 +528,9 @@ st_context_teximage(struct st_context_if +++ b/src/mesa/state_tracker/st_manager.c
if (util_format_get_component_bits(internal_format, @@ -512,6 +512,9 @@ st_context_teximage(struct st_context_iface *stctxi,
UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
if (util_format_has_alpha(tex->format))
internalFormat = GL_RGBA; internalFormat = GL_RGBA;
+ else if (util_format_get_component_bits(internal_format, + else if (util_format_get_component_bits(pipe_format,
+ UTIL_FORMAT_COLORSPACE_RGB, 0) == 5) + UTIL_FORMAT_COLORSPACE_RGB, 0) == 5)
+ internalFormat = GL_RGB5; + internalFormat = GL_RGB5;
else else
internalFormat = GL_RGB; internalFormat = GL_RGB;