From: Nick Bowler Date: Wed, 12 May 2010 00:09:10 +0000 (-0400) Subject: mesa: Add proper 7.8 invalidate fix. X-Git-Url: http://git.draconx.ca/gitweb/gentoo-draconx.git/commitdiff_plain/377dfb5d0df4e7a179636abeb192776e72966fc8 mesa: Add proper 7.8 invalidate fix. --- diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest index a817545..5e6785a 100644 --- a/media-libs/mesa/Manifest +++ b/media-libs/mesa/Manifest @@ -1,6 +1,6 @@ -AUX 0001-dri2-Fix-compatibility-with-old-servers.patch 1687 RMD160 a21a48a34472f6a789dc00fe3384a45761e6227e SHA1 b4536cc537fa430be70d7ba89886a522aaeb7480 SHA256 a86d1dac083906c2f60f0dcd3a7ef8f71e11940398004154ee6487bea8d5d793 +AUX 0001-glx-Only-call-DRI2-invalidate-when-necessary.patch 2068 RMD160 7ca8f567409ab67d5548ac7ecf308e49511dac7b SHA1 dbed1e762b74cad17d724f3349ab20053a53836c SHA256 9525f46f0a0a65af64dfc143da68f9bdafaf1453be3543f568851559d2d227f3 AUX 0001-i965-Fix-the-response-len-of-masked-sampler-messages.patch 2137 RMD160 08118ad35fec06fa5aeb7ca828cf763178158fb5 SHA1 40f5a8767d87244880544a26c6b1cdbd02edef22 SHA256 7a9ab83d98fced49ae2668b7e1f9a01a3a865246e0599bba61a4288af5e92773 DIST MesaLib-7.7.1.tar.bz2 4990250 RMD160 2f0dcc017aa97c364538a9fd29d5cdb247ab7880 SHA1 31500d7e3e3bbf9288b3bee4fbddd26a5e0b7782 SHA256 dc44f73e50d2ccdb96e7b72cc71e56024c198a228112c69c5e86dbc610fd4e84 DIST MesaLib-7.8.1.tar.bz2 5137426 RMD160 b7b989342dc80a2a12456c17882e652db7bd86cd SHA1 1c15c62f845ef9b648366aa804410f68f7f79172 SHA256 b0b46e5abfd75db44501e308125fa92bcf1c91d91e97a043a3b1764cfa0907fa EBUILD mesa-7.7.1.ebuild 6042 RMD160 1a975d055edfae21b0deb19a06a09c1fbc3f4299 SHA1 b6c204b0d760184d9028fe3adc6d86e91d71ed48 SHA256 84deea5a48d4c11981523fe8d2e63defc33b1cfe6ee81d5b447074d4797fc0ca -EBUILD mesa-7.8.1.ebuild 6021 RMD160 a115f83bc0c8fb79bc42fab59f0e587cf6385cf2 SHA1 cbc0ddb35ed91d6a950137ce745494e42713e507 SHA256 b15ca5d657f870d7bcb8849c572a5968ca5bf0a3850265474ce47493c5e23903 +EBUILD mesa-7.8.1.ebuild 6026 RMD160 ccdbe5f9022a846fb6bc82ffdb0354c6f5a63987 SHA1 f9175fe1849af10bb78e481a51e164f43d5f67e4 SHA256 e73796475a0294d479af7fa8b19037e30112118d9bf4f1186721d71194120984 diff --git a/media-libs/mesa/files/0001-dri2-Fix-compatibility-with-old-servers.patch b/media-libs/mesa/files/0001-dri2-Fix-compatibility-with-old-servers.patch deleted file mode 100644 index e59d4c7..0000000 --- a/media-libs/mesa/files/0001-dri2-Fix-compatibility-with-old-servers.patch +++ /dev/null @@ -1,44 +0,0 @@ -From c8327cc115997275f701993a7edbcbf42b08912b Mon Sep 17 00:00:00 2001 -From: Nick Bowler -Date: Fri, 30 Apr 2010 18:14:20 -0400 -Subject: [PATCH v3] dri2: Fix compatibility with old servers. - -Commit 61d26bc82e7c4100a ("dri2: Event driven buffer validation.") -introduced code to handle "old" servers which do not support invalidate -events (i.e. 1.8.0). However, the compatibility code causes severe -stuttering on my GM45 with "older" servers that do not support swap -events (i.e. 1.7.6). It seems that the solution is to only run the -compatibility code when swap events are supported. - -Fixes fdo bug #27277. - -Signed-off-by: Nick Bowler ---- - src/glx/dri2_glx.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c -index 6058c72..5516324 100644 ---- a/src/glx/dri2_glx.c -+++ b/src/glx/dri2_glx.c -@@ -364,7 +364,7 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate) - __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)priv->dri2Display; - - /* Old servers don't send invalidate events */ -- if (!pdp->invalidateAvailable) -+ if (pdp->swapAvailable && !pdp->invalidateAvailable) - dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable); - - dri2WaitGL(loaderPrivate); -@@ -428,7 +428,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, - #endif - - /* Old servers don't send invalidate events */ -- if (!pdp->invalidateAvailable) -+ if (pdp->swapAvailable && !pdp->invalidateAvailable) - dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); - - /* Old servers can't handle swapbuffers */ --- -1.6.4.4 - diff --git a/media-libs/mesa/files/0001-glx-Only-call-DRI2-invalidate-when-necessary.patch b/media-libs/mesa/files/0001-glx-Only-call-DRI2-invalidate-when-necessary.patch new file mode 100644 index 0000000..3ea35d7 --- /dev/null +++ b/media-libs/mesa/files/0001-glx-Only-call-DRI2-invalidate-when-necessary.patch @@ -0,0 +1,58 @@ +From 2d00d16da7f5d2255cb37b48edaf4cbb9ca7e930 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= +Date: Mon, 10 May 2010 15:51:31 -0400 +Subject: [PATCH] glx: Only call DRI2 invalidate when necessary + +We only need this when the server may have swapped the buffers or +when we receive an invalidate event from the server. The default +behaviour is still that the DRI driver will invalidate its own buffers +when glViewport is called. + +https://bugs.freedesktop.org/show_bug.cgi?id=27277 +--- + src/glx/dri2_glx.c | 16 ++++------------ + 1 files changed, 4 insertions(+), 12 deletions(-) + +diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c +index 6058c72..ca2a753 100644 +--- a/src/glx/dri2_glx.c ++++ b/src/glx/dri2_glx.c +@@ -359,14 +359,6 @@ dri2WaitGL(__GLXDRIdrawable * pdraw) + static void + dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate) + { +- __GLXDRIdrawablePrivate *pdraw = loaderPrivate; +- __GLXdisplayPrivate *priv = __glXInitialize(pdraw->base.psc->dpy); +- __GLXDRIdisplayPrivate *pdp = (__GLXDRIdisplayPrivate *)priv->dri2Display; +- +- /* Old servers don't send invalidate events */ +- if (!pdp->invalidateAvailable) +- dri2InvalidateBuffers(priv->dpy, pdraw->base.drawable); +- + dri2WaitGL(loaderPrivate); + } + +@@ -427,16 +419,16 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, + (*pdraw->psc->f->flush)(pdraw->driDrawable); + #endif + +- /* Old servers don't send invalidate events */ +- if (!pdp->invalidateAvailable) +- dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); +- + /* Old servers can't handle swapbuffers */ + if (!pdp->swapAvailable) { + dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height); + return 0; + } + ++ /* Old servers don't send invalidate events */ ++ if (!pdp->invalidateAvailable) ++ dri2InvalidateBuffers(dpyPriv->dpy, pdraw->drawable); ++ + #ifdef X_DRI2SwapBuffers + DRI2SwapBuffers(pdraw->psc->dpy, pdraw->xDrawable, target_msc, divisor, + remainder, &ret); +-- +1.6.4.4 + diff --git a/media-libs/mesa/mesa-7.8.1.ebuild b/media-libs/mesa/mesa-7.8.1.ebuild index b52cecc..d919852 100644 --- a/media-libs/mesa/mesa-7.8.1.ebuild +++ b/media-libs/mesa/mesa-7.8.1.ebuild @@ -104,7 +104,7 @@ src_prepare() { [[ ${CHOST} == *-freebsd6.* ]] && \ sed -i -e "s/-DHAVE_POSIX_MEMALIGN//" configure.ac - epatch "${FILESDIR}/0001-dri2-Fix-compatibility-with-old-servers.patch" + epatch "${FILESDIR}/0001-glx-Only-call-DRI2-invalidate-when-necessary.patch" eautoreconf }