Hello community, here is the log from the commit of package xf86-video-intel for openSUSE:Factory checked in at 2013-01-22 18:07:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xf86-video-intel (Old) and /work/SRC/openSUSE:Factory/.xf86-video-intel.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-video-intel", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/xf86-video-intel/xf86-video-intel.changes 2013-01-17 11:05:45.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.xf86-video-intel.new/xf86-video-intel.changes 2013-01-22 18:07:15.000000000 +0100 @@ -1,0 +2,9 @@ +Mon Jan 21 13:34:13 UTC 2013 - [email protected] + +- Update to version 2.20.19: + A quick release as the last broke USB DisplayLink slave outputs + badly. The performance of those displays was unusable due to a + inadvertent change that caused us to flush the entire scanout + over the USB for every drawing operation. + +------------------------------------------------------------------- Old: ---- xf86-video-intel-2.20.18.tar.bz2 New: ---- xf86-video-intel-2.20.19.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xf86-video-intel.spec ++++++ --- /var/tmp/diff_new_pack.xAZP6s/_old 2013-01-22 18:07:18.000000000 +0100 +++ /var/tmp/diff_new_pack.xAZP6s/_new 2013-01-22 18:07:18.000000000 +0100 @@ -19,7 +19,7 @@ %define glamor 1 Name: xf86-video-intel -Version: 2.20.18 +Version: 2.20.19 Release: 0 Summary: Intel video driver for the Xorg X server License: MIT ++++++ xf86-video-intel-2.20.18.tar.bz2 -> xf86-video-intel-2.20.19.tar.bz2 ++++++ ++++ 2325 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/ChangeLog new/xf86-video-intel-2.20.19/ChangeLog --- old/xf86-video-intel-2.20.18/ChangeLog 2013-01-16 13:21:15.000000000 +0100 +++ new/xf86-video-intel-2.20.19/ChangeLog 2013-01-20 13:06:35.000000000 +0100 @@ -1,3 +1,191 @@ +commit a88a9b9a59fa2d5fd427fa6e1f74fb9844379264 +Author: Chris Wilson <[email protected]> +Date: Sun Jan 20 12:06:09 2013 +0000 + + 2.20.19 release + +commit 7822bbacbece6fcb2e12863cd6c7a53ab614c37c +Author: Chris Wilson <[email protected]> +Date: Sun Jan 20 11:43:49 2013 +0000 + + test: Add script to generate source file for testing vsync + + Courtesy of an original script by Mark Schreiber, + https://bugs.freedesktop.org/show_bug.cgi?id=59606 + +commit 9329d8755981989ccbe66df6085fbab7c809a2c6 +Author: Chris Wilson <[email protected]> +Date: Sun Jan 20 10:14:21 2013 +0000 + + sna: Make DEBUG_SYNC a configure option + + As it is advisable to combined the synchronous rendering debug option + with other debugging options, it is more convenient to make it into a + configure option: --enable-debug=sync + + Signed-off-by: Chris Wilson <[email protected]> + +commit c9263f192e2f85dd961bc1c4e9ca8180db874517 +Author: Chris Wilson <[email protected]> +Date: Sun Jan 20 01:39:12 2013 +0000 + + sna: Apply DEBUG_SYNC prior to emitting error report + + This is handy for the case where the batch triggers a GPU hang rather + than being rejected by the kernel. + + Signed-off-by: Chris Wilson <[email protected]> + +commit 42ab789cce8423d99864776c6d5ba759c4129b54 +Author: Chris Wilson <[email protected]> +Date: Fri Jan 18 13:56:53 2013 +0000 + + sna: Clear the non-intersecting damage after skipping the slave update + + Signed-off-by: Chris Wilson <[email protected]> + +commit 828a3a80aa3f0692e7be2831d58bccf02e2c481d +Author: Chris Wilson <[email protected]> +Date: Fri Jan 18 13:16:23 2013 +0000 + + uxa: Clip dirty region to slave pixmap before appending damage + + Fixes regression from + + commit c789d06cf8a0debc67058d7be1483f5b542e2baa + Author: Dave Airlie <[email protected]> + Date: Mon Jan 7 13:57:21 2013 +1000 + + intel: fixup damage posting to be done correctly around slave pixmap + + which causes the entire slave scanout to be readback from uncached + memory every time a pixel is modified. + + Reported-by: Stephen Liang <[email protected]> + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59539 + Signed-off-by: Chris Wilson <[email protected]> + +commit e17eaf540b614cdcb8f7349dd01852c3afc5ab05 +Author: Chris Wilson <[email protected]> +Date: Fri Jan 18 13:09:36 2013 +0000 + + sna: Replace double negative '!RegionNotEmpty' with the equivalent RegionNil + + Signed-off-by: Chris Wilson <[email protected]> + +commit 2de43a0164ba5364ffd7cb48f0bccc9873e87332 +Author: Chris Wilson <[email protected]> +Date: Fri Jan 18 12:01:54 2013 +0000 + + sna: Skip an empty slave update + + Signed-off-by: Chris Wilson <[email protected]> + +commit 38de17f80d780bf219fc3c4018ad9cc8808ba50f +Author: Chris Wilson <[email protected]> +Date: Fri Jan 18 10:16:42 2013 +0000 + + sna: Remove bogus assertion invalidated by 'read-read' sync + + If we perform a read-read synchronisation, the kernel may still believe + that the bo is busy as it remains on the active lists being read by the + GPU. + + Signed-off-by: Chris Wilson <[email protected]> + +commit 9f68ac60ae37cc72503ec40691d1ae43a476f8e7 +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 20:00:34 2013 +0000 + + sna/dri: Explicitly flag sync copies for the backends + + As gen6/7 need to prevent ring switching and perform a rendercopy if we + need to perform a vsync'ed copy. + + Signed-off-by: Chris Wilson <[email protected]> + +commit 1ee00c408d8142cfaf4202393c2364c9ae73cb6e +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 13:09:47 2013 +0000 + + sna/trapezoids: Fix horizontal offset for inplace operation + + Remember that for an inplace operation we are not dealing with an a8 + mask, but rather a x8r8g8b8 surface and so need to step accordingly. + + Signed-off-by: Chris Wilson <[email protected]> + +commit 0d749f93ea52161e59da1adca1a22e96ba293551 +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 12:28:18 2013 +0000 + + sna: Drop the MOVE_WHOLE_HINT for PutImage + + It is not as clearly beneficial as for GetImage, as for example toolkits + may only push the shadows around a window. + + Signed-off-by: Chris Wilson <[email protected]> + +commit dc643ef753bcfb69685f1eb10828d0c8f830c30e +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 12:27:55 2013 +0000 + + sna: Apply read-only synchronization hints for move-to-cpu + + Signed-off-by: Chris Wilson <[email protected]> + +commit 18035a21e147788bea03ab2175ca03ae951701ce +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 11:52:10 2013 +0000 + + sna: Remove the confusion of the pixmap->undamaged + + This was to track a pixmap that had been used for migration (i.e had in + the past been used for mixed rendering). It is no longer used so remove + it. + + Signed-off-by: Chris Wilson <[email protected]> + +commit 46141d277f326ae78f7b0e927a500e0eb1987f1b +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 10:16:24 2013 +0000 + + sna: Consider fill style for XPolyRectangle + + The rectangle outline is not always solid... + + Signed-off-by: Chris Wilson <[email protected]> + +commit d5c8d38afaba04281157bafe212e93f010ae00f5 +Author: Chris Wilson <[email protected]> +Date: Thu Jan 17 10:10:54 2013 +0000 + + sna: Refactor to remove a goto from sna_put_zpixmap_blt() + + The complexity of the function has been moved to move-to-cpu so we can + take further advantage of the simplified logic in put_zpixmap to clean + up the code by removing an unwanted goto. + + Signed-off-by: Chris Wilson <[email protected]> + +commit 9552438caa4d295c99a9b8821cf2644739861c6a +Author: Colin Walters <[email protected]> +Date: Wed Jan 4 17:37:06 2012 -0500 + + autogen.sh: Implement GNOME Build API + + http://people.gnome.org/~walters/docs/build-api.txt + + Signed-off-by: Adam Jackson <[email protected]> + +commit 87d773249af18ae8722aacb7306b0eee51a90dbc +Author: Adam Jackson <[email protected]> +Date: Wed Jan 16 13:18:23 2013 -0500 + + configure: Drop AM_MAINTAINER_MODE + + Signed-off-by: Adam Jackson <[email protected]> + commit dbf1cfec9cd4e9efe7650f2940c92b4e51214288 Author: Chris Wilson <[email protected]> Date: Wed Jan 16 12:20:48 2013 +0000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/NEWS new/xf86-video-intel-2.20.19/NEWS --- old/xf86-video-intel-2.20.18/NEWS 2013-01-16 13:18:46.000000000 +0100 +++ new/xf86-video-intel-2.20.19/NEWS 2013-01-20 13:05:43.000000000 +0100 @@ -1,3 +1,24 @@ +Release 2.20.19 (2013-01-20) +============================ +A quick release as the last broke USB DisplayLink slave outputs badly. The +performance of those displays was unusable due to a inadvertent change that +caused us to flush the entire scanout over the USB for every drawing +operation. + + * Implement the GNOME Build API. A couple of minor changes to make + integrators and distributors lives a little easier, or at least more + consistent. + + * Correctly offset inplace trapezoids for subwindows, such as the GTK+ + close button after it has a background image uploaded. + + * Explicitly prevent ring-switching for synchronized rendering to + scanouts (for vsync). + + * Clip dirty region to slave pixmaps (otherwise UDL is nigh unusuable) + https://bugs.freedesktop.org/show_bug.cgi?id=59539 + + Release 2.20.18 (2013-01-16) ============================ A bunch of miscellaneous fixes for assertion failures and various diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/config.h.in new/xf86-video-intel-2.20.19/config.h.in --- old/xf86-video-intel-2.20.18/config.h.in 2013-01-16 13:21:15.000000000 +0100 +++ new/xf86-video-intel-2.20.19/config.h.in 2013-01-20 13:06:35.000000000 +0100 @@ -11,6 +11,9 @@ /* Enable pixmap debugging */ #undef DEBUG_PIXMAP +/* Enable synchronous rendering for debugging */ +#undef DEBUG_SYNC + /* Default acceleration method */ #undef DEFAULT_ACCEL_METHOD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/configure.ac new/xf86-video-intel-2.20.19/configure.ac --- old/xf86-video-intel-2.20.18/configure.ac 2013-01-16 13:20:32.000000000 +0100 +++ new/xf86-video-intel-2.20.19/configure.ac 2013-01-20 13:05:50.000000000 +0100 @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-intel], - [2.20.18], + [2.20.19], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-intel]) AC_CONFIG_SRCDIR([Makefile.am]) @@ -32,7 +32,6 @@ # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], @@ -419,6 +418,9 @@ AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings]) fi fi +if test "x$DEBUG" = xsync; then + AC_DEFINE(DEBUG_SYNC,1,[Enable synchronous rendering for debugging]) +fi if test "x$DEBUG" = xmemory; then AC_DEFINE(DEBUG_MEMORY,1,[Enable memory debugging]) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/intel_driver.c new/xf86-video-intel-2.20.19/src/intel_driver.c --- old/xf86-video-intel-2.20.18/src/intel_driver.c 2013-01-07 21:22:12.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/intel_driver.c 2013-01-20 12:58:22.000000000 +0100 @@ -686,7 +686,7 @@ } #ifdef INTEL_PIXMAP_SHARING -static Bool +static void redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); @@ -695,9 +695,19 @@ int was_blocked; PixmapRegionInit(&pixregion, dirty->slave_dst->master_pixmap); - + RegionTranslate(&pixregion, dirty->x, dirty->y); + RegionIntersect(&pixregion, &pixregion, DamageRegion(dirty->damage)); + RegionTranslate(&pixregion, -dirty->x, -dirty->y); + was_blocked = RegionNil(&pixregion); DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion); + RegionUninit(&pixregion); + if (was_blocked) + return; + + PixmapRegionInit(&pixregion, dirty->slave_dst->master_pixmap); PixmapSyncDirtyHelper(dirty, &pixregion); + RegionUninit(&pixregion); + intel_batch_submit(scrn); if (!intel->has_prime_vmap_flush) { drm_intel_bo *bo = intel_get_pixmap_bo(dirty->slave_dst->master_pixmap); @@ -706,10 +716,9 @@ drm_intel_bo_unmap(bo); xf86UnblockSIGIO(was_blocked); } - DamageRegionProcessPending(&dirty->slave_dst->drawable); - RegionUninit(&pixregion); - return 0; + DamageRegionProcessPending(&dirty->slave_dst->drawable); + return; } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/gen6_render.c new/xf86-video-intel-2.20.19/src/sna/gen6_render.c --- old/xf86-video-intel-2.20.18/src/sna/gen6_render.c 2013-01-14 18:09:16.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/gen6_render.c 2013-01-20 12:58:22.000000000 +0100 @@ -2453,6 +2453,9 @@ struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (PREFER_RENDER) return PREFER_RENDER > 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/gen7_render.c new/xf86-video-intel-2.20.19/src/sna/gen7_render.c --- old/xf86-video-intel-2.20.18/src/sna/gen7_render.c 2013-01-16 12:48:11.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/gen7_render.c 2013-01-20 12:58:22.000000000 +0100 @@ -2557,6 +2557,9 @@ struct kgem_bo *dst_bo, unsigned flags) { + if (flags & COPY_SYNC) + return false; + if (sna->kgem.ring == KGEM_BLT) return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/kgem.c new/xf86-video-intel-2.20.19/src/sna/kgem.c --- old/xf86-video-intel-2.20.18/src/sna/kgem.c 2013-01-16 12:48:11.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/kgem.c 2013-01-20 12:58:22.000000000 +0100 @@ -75,6 +75,10 @@ #define DBG_NO_HANDLE_LUT 0 #define DBG_DUMP 0 +#ifndef DEBUG_SYNC +#define DEBUG_SYNC 0 +#endif + #define SHOW_BATCH 0 #ifndef USE_FASTRELOC @@ -2649,6 +2653,26 @@ kgem_throttle(kgem); ret = 0; } + + if (DEBUG_SYNC && ret == 0) { + struct drm_i915_gem_set_domain set_domain; + + DBG(("%s: debug sync, starting\n", __FUNCTION__)); + + VG_CLEAR(set_domain); + set_domain.handle = handle; + set_domain.read_domains = I915_GEM_DOMAIN_GTT; + set_domain.write_domain = I915_GEM_DOMAIN_GTT; + + ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain); + if (ret == -1) { + DBG(("%s: sync: GPU hang detected\n", __FUNCTION__)); + kgem_throttle(kgem); + } + + DBG(("%s: debug sync, completed\n", __FUNCTION__)); + } + #if !NDEBUG if (ret < 0) { ret = errno; @@ -2695,25 +2719,6 @@ FatalError("SNA: failed to submit batchbuffer, errno=%d\n", ret); } #endif - - if (DEBUG_FLUSH_SYNC) { - struct drm_i915_gem_set_domain set_domain; - - DBG(("%s: debug sync, starting\n", __FUNCTION__)); - - VG_CLEAR(set_domain); - set_domain.handle = handle; - set_domain.read_domains = I915_GEM_DOMAIN_GTT; - set_domain.write_domain = I915_GEM_DOMAIN_GTT; - - ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain); - if (ret == -1) { - DBG(("%s: sync: GPU hang detected\n", __FUNCTION__)); - kgem_throttle(kgem); - } - - DBG(("%s: debug sync, completed\n", __FUNCTION__)); - } } kgem_commit(kgem); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna.h new/xf86-video-intel-2.20.19/src/sna/sna.h --- old/xf86-video-intel-2.20.18/src/sna/sna.h 2013-01-16 12:48:11.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna.h 2013-01-20 12:58:22.000000000 +0100 @@ -82,7 +82,6 @@ #define DEBUG_NO_BLT 0 #define DEBUG_FLUSH_BATCH 0 -#define DEBUG_FLUSH_SYNC 0 #define TEST_ALL 0 #define TEST_ACCEL (TEST_ALL || 0) @@ -130,7 +129,6 @@ uint8_t mapped :1; uint8_t shm :1; uint8_t clear :1; - uint8_t undamaged :1; uint8_t header :1; uint8_t cpu :1; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_accel.c new/xf86-video-intel-2.20.19/src/sna/sna_accel.c --- old/xf86-video-intel-2.20.18/src/sna/sna_accel.c 2013-01-16 12:48:11.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_accel.c 2013-01-20 12:58:22.000000000 +0100 @@ -350,7 +350,7 @@ _sna_damage_debug_get_region(DAMAGE_PTR(priv->cpu_damage), &cpu); RegionIntersect(®, &cpu, &gpu); - assert(!RegionNotEmpty(®)); + assert(RegionNil(®)); RegionUninit(®); RegionUninit(&gpu); @@ -530,7 +530,6 @@ DBG(("%s: entire source is damaged, using Y-tiling\n", __FUNCTION__)); sna_damage_destroy(&priv->gpu_damage); - priv->undamaged = false; return I915_TILING_Y; } @@ -1532,7 +1531,6 @@ pixmap->drawable.width, pixmap->drawable.height); sna_damage_destroy(&priv->cpu_damage); - priv->undamaged = false; priv->clear = false; priv->cpu = false; list_del(&priv->list); @@ -1547,6 +1545,7 @@ skip_inplace_map: sna_damage_destroy(&priv->gpu_damage); + priv->clear = false; if (priv->cpu_bo && !priv->cpu_bo->flush && __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) { DBG(("%s: discarding busy CPU bo\n", __FUNCTION__)); @@ -1554,7 +1553,6 @@ assert(priv->gpu_bo == NULL || priv->gpu_damage == NULL); sna_damage_destroy(&priv->cpu_damage); - priv->undamaged = false; sna_pixmap_free_gpu(sna, priv); sna_pixmap_free_cpu(sna, priv); @@ -1596,7 +1594,6 @@ sna_damage_destroy(&priv->cpu_damage); sna_pixmap_free_cpu(sna, priv); list_del(&priv->list); - priv->undamaged = false; priv->clear = false; } @@ -1610,7 +1607,8 @@ if (priv->mapped) { assert(!priv->shm); - pixmap->devPrivate.ptr = NULL; + pixmap->devPrivate.ptr = PTR(priv->ptr); + pixmap->devKind = priv->stride; priv->mapped = false; } @@ -1637,18 +1635,19 @@ sna_damage_destroy(&priv->cpu_damage); sna_pixmap_free_cpu(sna, priv); list_del(&priv->list); - priv->undamaged = false; priv->clear = false; } - kgem_bo_sync__cpu_full(&sna->kgem, priv->gpu_bo, flags & MOVE_WRITE); + kgem_bo_sync__cpu_full(&sna->kgem, + priv->gpu_bo, flags & MOVE_WRITE); assert_pixmap_damage(pixmap); DBG(("%s: operate inplace (CPU)\n", __FUNCTION__)); return true; } } - if (priv->clear && priv->cpu_bo && !priv->cpu_bo->flush && + if (((flags & MOVE_READ) == 0 || priv->clear) && + priv->cpu_bo && !priv->cpu_bo->flush && __kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) { assert(!priv->shm); sna_pixmap_free_cpu(sna, priv); @@ -1685,7 +1684,7 @@ pixmap->drawable.width, pixmap->drawable.height); sna_pixmap_free_gpu(sna, priv); - priv->undamaged = false; + assert(priv->gpu_damage == NULL); priv->clear = false; } @@ -1715,7 +1714,6 @@ __sna_damage_destroy(DAMAGE_PTR(priv->gpu_damage)); priv->gpu_damage = NULL; - priv->undamaged = true; } if (flags & MOVE_WRITE || priv->create & KGEM_CAN_CREATE_LARGE) { @@ -1724,7 +1722,6 @@ pixmap->drawable.width, pixmap->drawable.height); sna_pixmap_free_gpu(sna, priv); - priv->undamaged = false; if (priv->flush) { assert(!priv->shm); @@ -1734,25 +1731,24 @@ done: if (flags & MOVE_WRITE) { + assert(DAMAGE_IS_ALL(priv->cpu_damage)); priv->source_count = SOURCE_BIAS; assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL); if (priv->gpu_bo && priv->gpu_bo->domain != DOMAIN_GPU) { DBG(("%s: discarding inactive GPU bo\n", __FUNCTION__)); - assert(DAMAGE_IS_ALL(priv->cpu_damage)); sna_pixmap_free_gpu(sna, priv); - priv->undamaged = false; } } if (priv->cpu_bo) { if ((flags & MOVE_ASYNC_HINT) == 0) { DBG(("%s: syncing CPU bo\n", __FUNCTION__)); - kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo); + kgem_bo_sync__cpu_full(&sna->kgem, + priv->cpu_bo, flags & MOVE_WRITE); } if (flags & MOVE_WRITE) { DBG(("%s: discarding GPU bo in favour of CPU bo\n", __FUNCTION__)); sna_pixmap_free_gpu(sna, priv); - priv->undamaged = false; } } priv->cpu = (flags & MOVE_ASYNC_HINT) == 0; @@ -1892,7 +1888,6 @@ __FUNCTION__, pixmap->drawable.serialNumber)); sna_damage_destroy(&priv->gpu_damage); - priv->undamaged = false; if (flags & MOVE_WRITE) sna_pixmap_free_gpu(sna, priv); @@ -1953,7 +1948,6 @@ DBG(("%s: replaced entire pixmap, destroying CPU shadow\n", __FUNCTION__)); sna_damage_destroy(&priv->cpu_damage); - priv->undamaged = false; list_del(&priv->list); } else sna_damage_subtract(&priv->cpu_damage, @@ -1992,7 +1986,6 @@ sna_damage_all(&priv->gpu_damage, pixmap->drawable.width, pixmap->drawable.height); - priv->undamaged = false; sna_pixmap_free_cpu(sna, priv); } } @@ -2071,7 +2064,6 @@ box, n); } sna_damage_destroy(&priv->gpu_damage); - priv->undamaged = true; } if (priv->gpu_damage && @@ -2183,7 +2175,6 @@ } sna_damage_destroy(&priv->gpu_damage); - priv->undamaged = true; } else if (DAMAGE_IS_ALL(priv->gpu_damage) || sna_damage_contains_box__no_reduce(priv->gpu_damage, &r->extents)) { @@ -2208,7 +2199,6 @@ box, n); sna_damage_subtract(&priv->gpu_damage, r); - priv->undamaged = true; } else { RegionRec need; @@ -2235,7 +2225,6 @@ box, n); sna_damage_subtract(&priv->gpu_damage, r); - priv->undamaged = true; RegionUninit(&need); } } @@ -2259,7 +2248,6 @@ __FUNCTION__)); sna_pixmap_free_gpu(sna, priv); } - priv->undamaged = false; } if (priv->flush) { assert(!priv->shm); @@ -2278,8 +2266,8 @@ } if ((flags & MOVE_ASYNC_HINT) == 0 && priv->cpu_bo) { DBG(("%s: syncing cpu bo\n", __FUNCTION__)); - kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo); - assert(!kgem_bo_is_busy(priv->cpu_bo)); + kgem_bo_sync__cpu_full(&sna->kgem, + priv->cpu_bo, flags & MOVE_WRITE); } priv->cpu = (flags & MOVE_ASYNC_HINT) == 0; assert(pixmap->devPrivate.ptr); @@ -2410,7 +2398,6 @@ pixmap->drawable.width, pixmap->drawable.height)) { sna_damage_destroy(&priv->cpu_damage); - priv->undamaged = false; list_del(&priv->list); goto done; } @@ -2422,7 +2409,6 @@ assert_pixmap_damage(pixmap); if (priv->cpu_damage == NULL) { - priv->undamaged = false; list_del(&priv->list); return sna_pixmap_move_to_gpu(pixmap, flags); } @@ -2504,7 +2490,6 @@ sna_damage_destroy(&priv->cpu_damage); list_del(&priv->list); - priv->undamaged = true; } else if (DAMAGE_IS_ALL(priv->cpu_damage) || sna_damage_contains_box__no_reduce(priv->cpu_damage, box)) { bool ok = false; @@ -2537,7 +2522,6 @@ return false; sna_damage_subtract(&priv->cpu_damage, &r); - priv->undamaged = true; } else if (sna_damage_intersect(priv->cpu_damage, &r, &i)) { int n = REGION_NUM_RECTS(&i); bool ok; @@ -2573,7 +2557,6 @@ return false; sna_damage_subtract(&priv->cpu_damage, &r); - priv->undamaged = true; RegionUninit(&i); } @@ -2594,7 +2577,6 @@ sna_damage_all(&priv->gpu_damage, pixmap->drawable.width, pixmap->drawable.height); - priv->undamaged = false; } } @@ -2731,7 +2713,6 @@ sna_damage_subtract(&priv->cpu_damage, ®ion); if (priv->cpu_damage == NULL) { list_del(&priv->list); - priv->undamaged = false; priv->cpu = false; } } @@ -2824,7 +2805,6 @@ pixmap->drawable.height)) { sna_damage_destroy(&priv->cpu_damage); list_del(&priv->list); - priv->undamaged = false; *damage = NULL; } else *damage = &priv->gpu_damage; @@ -3049,7 +3029,6 @@ DBG(("%s: already all-damaged\n", __FUNCTION__)); sna_damage_destroy(&priv->cpu_damage); list_del(&priv->list); - priv->undamaged = false; assert(priv->cpu == false || IS_CPU_MAP(priv->gpu_bo->map)); goto active; } @@ -3182,7 +3161,6 @@ __sna_damage_destroy(DAMAGE_PTR(priv->cpu_damage)); priv->cpu_damage = NULL; - priv->undamaged = true; if (priv->shm) { assert(!priv->flush); @@ -3207,10 +3185,8 @@ sna_damage_reduce_all(&priv->gpu_damage, pixmap->drawable.width, pixmap->drawable.height); - if (DAMAGE_IS_ALL(priv->gpu_damage)) { - priv->undamaged = false; + if (DAMAGE_IS_ALL(priv->gpu_damage)) sna_pixmap_free_cpu(sna, priv); - } active: if (flags & MOVE_WRITE) @@ -3426,11 +3402,6 @@ int x, int y, int w, int h, char *bits, int stride) { PixmapPtr pixmap = get_drawable_pixmap(drawable); - struct sna *sna = to_sna_from_pixmap(pixmap); - struct sna_pixmap *priv = sna_pixmap(pixmap); - unsigned flags; - char *dst_bits; - int dst_stride; BoxRec *box; int16_t dx, dy; int n; @@ -3440,33 +3411,19 @@ if (gc->alu != GXcopy) return false; - if (!priv) { - if (drawable->depth < 8) - return false; - - goto blt; - } - - flags = MOVE_WRITE; - if (w == pixmap->drawable.width) { - flags |= MOVE_WHOLE_HINT; - if (h != pixmap->drawable.height) - flags |= MOVE_READ; - } + if (drawable->depth < 8) + return false; - if (!sna_drawable_move_region_to_cpu(&pixmap->drawable, region, flags)) + if (!sna_drawable_move_region_to_cpu(&pixmap->drawable, + region, MOVE_WRITE)) return false; -blt: get_drawable_deltas(drawable, pixmap, &dx, &dy); x += dx + drawable->x; y += dy + drawable->y; DBG(("%s: upload(%d, %d, %d, %d)\n", __FUNCTION__, x, y, w, h)); - dst_stride = pixmap->devKind; - dst_bits = pixmap->devPrivate.ptr; - /* Region is pre-clipped and translated into pixmap space */ box = REGION_RECTS(region); n = REGION_NUM_RECTS(region); @@ -3490,9 +3447,9 @@ assert(box->x2 - x <= w); assert(box->y2 - y <= h); - memcpy_blt(bits, dst_bits, + memcpy_blt(bits, pixmap->devPrivate.ptr, pixmap->drawable.bitsPerPixel, - stride, dst_stride, + stride, pixmap->devKind, box->x1 - x, box->y1 - y, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1); @@ -3809,7 +3766,7 @@ gc->pCompositeClip->extents.x2 < region.extents.x2 || gc->pCompositeClip->extents.y2 < region.extents.y2) { RegionIntersect(®ion, ®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; } @@ -4548,7 +4505,6 @@ dst_pixmap->drawable.width, dst_pixmap->drawable.height); list_del(&dst_priv->list); - dst_priv->undamaged = false; } else sna_damage_add(&dst_priv->gpu_damage, region); @@ -4757,7 +4713,7 @@ * VT is inactive, make sure the region isn't empty */ if (((WindowPtr)src)->parent || - !RegionNotEmpty(&((WindowPtr)src)->borderClip)) { + RegionNil(&((WindowPtr)src)->borderClip)) { DBG(("%s: include inferiors\n", __FUNCTION__)); free_clip = clip = NotClippedByChildren((WindowPtr)src); } @@ -5420,7 +5376,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; assert(dx + clip.extents.x1 >= 0); @@ -5521,7 +5477,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; assert(dx + clip.extents.x1 >= 0); @@ -5842,7 +5798,7 @@ DBG(("%s: fallback\n", __FUNCTION__)); region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (!sna_gc_move_to_cpu(gc, drawable, ®ion)) @@ -5882,7 +5838,7 @@ fallback: region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (!sna_gc_move_to_cpu(gc, drawable, ®ion)) @@ -6331,7 +6287,7 @@ __FUNCTION__, region.extents.x1, region.extents.y1, region.extents.x2, region.extents.y2)); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) goto empty; RegionTranslate(®ion, @@ -6588,7 +6544,7 @@ DBG(("%s: fallback\n", __FUNCTION__)); region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (!sna_gc_move_to_cpu(gc, drawable, ®ion)) @@ -6643,7 +6599,7 @@ region_set(&clip, extents); if (clipped) { region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; } @@ -7068,7 +7024,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; last.x = pt->x + drawable->x; @@ -7510,7 +7466,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (region_is_singular(&data.region)) @@ -7535,7 +7491,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (region_is_singular(&data.region)) @@ -7612,7 +7568,7 @@ fallback: DBG(("%s: fallback\n", __FUNCTION__)); region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (!sna_gc_move_to_cpu(gc, drawable, &data.region)) @@ -7742,7 +7698,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) goto done; if (clip.data) { @@ -7849,7 +7805,7 @@ region_set(&clip, extents); if (clipped) { region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; } DBG(("%s: [clipped] extents=(%d, %d), (%d, %d), delta=(%d, %d)\n", @@ -8417,7 +8373,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (region_is_singular(&data.region)) @@ -8456,7 +8412,7 @@ fallback: DBG(("%s: fallback\n", __FUNCTION__)); region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (!sna_gc_move_to_cpu(gc, drawable, &data.region)) @@ -8484,6 +8440,7 @@ Box32Rec box; int extra = gc->lineWidth >> 1; bool clipped; + bool zero = false; if (n == 0) return 0; @@ -8492,9 +8449,13 @@ box.y1 = r->y; box.x2 = box.x1 + r->width; box.y2 = box.y1 + r->height; + zero |= (r->width | r->height) == 0; - while (--n) - box32_add_rect(&box, ++r); + while (--n) { + r++; + zero |= (r->width | r->height) == 0; + box32_add_rect(&box, r); + } box.x2++; box.y2++; @@ -8504,13 +8465,15 @@ box.x2 += extra; box.y1 -= extra; box.y2 += extra; - } + zero = !zero; + } else + zero = true; clipped = box32_trim_and_translate(&box, drawable, gc); if (!box32_to_box16(&box, out)) return 0; - return 1 | clipped << 1; + return 1 | clipped << 1 | zero << 2; } static bool @@ -8549,7 +8512,7 @@ xRectangle rr = *r++; if ((rr.width | rr.height) == 0) - continue; + continue; /* XXX -> PolyLine */ DBG(("%s - zero : r[%d] = (%d, %d) x (%d, %d)\n", __FUNCTION__, n, rr.x, rr.y, rr.width, rr.height)); @@ -8604,7 +8567,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) goto done; if (clip.data) { @@ -8618,7 +8581,7 @@ n, rr.x, rr.y, rr.width, rr.height)); if ((rr.width | rr.height) == 0) - continue; + continue; /* XXX -> PolyLine */ rr.x += drawable->x; rr.y += drawable->y; @@ -8682,7 +8645,7 @@ n, rr.x, rr.y, rr.width, rr.height)); if ((rr.width | rr.height) == 0) - continue; + continue; /* XXX -> PolyLine */ rr.x += drawable->x; rr.y += drawable->y; @@ -8750,7 +8713,7 @@ __FUNCTION__, clip.extents.x1, clip.extents.y1, clip.extents.x2, clip.extents.y2)); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) goto done; if (clip.data) { @@ -8762,7 +8725,7 @@ int count; if ((rr.width | rr.height) == 0) - continue; + continue; /* XXX -> PolyLine */ rr.x += drawable->x; rr.y += drawable->y; @@ -8927,7 +8890,7 @@ xRectangle rr = *r++; if ((rr.width | rr.height) == 0) - continue; + continue; /* XXX -> PolyLine */ rr.x += dx; rr.y += dy; @@ -9025,8 +8988,9 @@ goto fallback; } - DBG(("%s: line=%d [%d], join=%d [%d], mask=%lu [%d]\n", + DBG(("%s: fill=_%d [%d], line=%d [%d], join=%d [%d], mask=%lu [%d]\n", __FUNCTION__, + gc->fillStyle, gc->fillStyle == FillSolid, gc->lineStyle, gc->lineStyle == LineSolid, gc->joinStyle, gc->joinStyle == JoinMiter, gc->planemask, PM_IS_SOLID(drawable, gc->planemask))); @@ -9034,7 +8998,7 @@ if (!PM_IS_SOLID(drawable, gc->planemask)) goto fallback; - if (gc->lineStyle == LineSolid && gc->joinStyle == JoinMiter) { + if (flags & 4 && gc->fillStyle == FillSolid && gc->lineStyle == LineSolid && gc->joinStyle == JoinMiter) { DBG(("%s: trying blt solid fill [%08lx] paths\n", __FUNCTION__, gc->fgPixel)); if ((bo = sna_drawable_use_bo(drawable, PREFER_GPU, @@ -9058,7 +9022,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (!sna_gc_move_to_cpu(gc, drawable, ®ion)) @@ -9197,7 +9161,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (region_is_singular(&data.region)) { @@ -9221,7 +9185,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; sna_gc_ops__tmp.FillSpans = sna_fill_spans__gpu; @@ -9257,7 +9221,7 @@ fallback: DBG(("%s -- fallback\n", __FUNCTION__)); region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (!sna_gc_move_to_cpu(gc, drawable, &data.region)) @@ -9335,7 +9299,6 @@ pixmap->drawable.height); sna_damage_destroy(&priv->cpu_damage); list_del(&priv->list); - priv->undamaged = false; priv->clear = true; priv->clear_color = gc->alu == GXcopy ? pixel : 0; @@ -9401,7 +9364,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) goto done; if (clip.data == NULL) { @@ -9572,7 +9535,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (region_is_singular(&data.region)) @@ -9609,7 +9572,7 @@ data.region.extents.x1, data.region.extents.y1, data.region.extents.x2, data.region.extents.y2)); region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) { + if (RegionNil(&data.region)) { DBG(("%s: nothing to do, all clipped\n", __FUNCTION__)); return; } @@ -9819,7 +9782,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) goto done; b = sna->kgem.batch + sna->kgem.nbatch; @@ -10146,7 +10109,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) goto done; if (clip.data == NULL) { @@ -10425,7 +10388,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; b = sna->kgem.batch + sna->kgem.nbatch; @@ -10757,7 +10720,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) + if (RegionNil(&clip)) return true; pat.x = origin->x + drawable->x; @@ -11366,7 +11329,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) { + if (RegionNil(&clip)) { DBG(("%s: all clipped\n", __FUNCTION__)); return true; } @@ -11511,7 +11474,7 @@ region_set(&clip, extents); region_maybe_clip(&clip, gc->pCompositeClip); - if (!RegionNotEmpty(&clip)) { + if (RegionNil(&clip)) { DBG(("%s: all clipped\n", __FUNCTION__)); return true; } @@ -11796,7 +11759,6 @@ sna_damage_all(&priv->gpu_damage, pixmap->drawable.width, pixmap->drawable.height); - priv->undamaged = false; } } if (priv->cpu_damage == NULL) { @@ -11850,7 +11812,7 @@ region.extents.x2, region.extents.y2)); region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) { + if (RegionNil(®ion)) { DBG(("%s: nothing to do, all clipped\n", __FUNCTION__)); return; } @@ -11943,7 +11905,7 @@ } else { region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) + if (RegionNil(&data.region)) return; if (region_is_singular(&data.region)) @@ -11980,7 +11942,7 @@ data.region.extents.x1, data.region.extents.y1, data.region.extents.x2, data.region.extents.y2)); region_maybe_clip(&data.region, gc->pCompositeClip); - if (!RegionNotEmpty(&data.region)) { + if (RegionNil(&data.region)) { DBG(("%s: nothing to do, all clipped\n", __FUNCTION__)); return; } @@ -12437,7 +12399,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return x + extents.overallRight; if (FORCE_FALLBACK) @@ -12511,7 +12473,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return x + extents.overallRight; if (FORCE_FALLBACK) @@ -12592,7 +12554,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; DBG(("%s: clipped extents (%d, %d), (%d, %d)\n", @@ -12674,7 +12636,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; DBG(("%s: clipped extents (%d, %d), (%d, %d)\n", @@ -12976,7 +12938,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (FORCE_FALLBACK) @@ -13054,7 +13016,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (FORCE_FALLBACK) @@ -13255,7 +13217,7 @@ region.data = NULL; region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; switch (gc->fillStyle) { @@ -13567,7 +13529,7 @@ RegionNull(&dst); RegionIntersect(&dst, &win->borderClip, src); - if (!RegionNotEmpty(&dst)) + if (RegionNil(&dst)) return; #ifdef COMPOSITE @@ -13838,7 +13800,7 @@ int n; damage = DamageRegion(dirty->damage); - if (!RegionNotEmpty(damage)) + if (RegionNil(damage)) continue; src = dirty->src; @@ -13859,6 +13821,9 @@ region.extents.x2, region.extents.y2)); RegionIntersect(®ion, ®ion, damage); + if (RegionNil(®ion)) + goto skip; + RegionTranslate(®ion, -dirty->x, -dirty->y); DamageRegionAppend(&dirty->slave_dst->drawable, ®ion); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_composite.c new/xf86-video-intel-2.20.19/src/sna/sna_composite.c --- old/xf86-video-intel-2.20.18/src/sna/sna_composite.c 2012-11-23 14:10:37.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_composite.c 2013-01-17 14:48:00.000000000 +0100 @@ -849,7 +849,6 @@ sna_damage_all(&priv->gpu_damage, pixmap->drawable.width, pixmap->drawable.height); - priv->undamaged = false; } } if (priv->cpu_damage == NULL) { @@ -887,7 +886,6 @@ pixmap->drawable.height); sna_damage_destroy(damage == &priv->gpu_damage ? &priv->cpu_damage : &priv->gpu_damage); - priv->undamaged = false; } if (op <= PictOpSrc && bo == priv->gpu_bo) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_damage.c new/xf86-video-intel-2.20.19/src/sna/sna_damage.c --- old/xf86-video-intel-2.20.18/src/sna/sna_damage.c 2012-11-06 17:21:30.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_damage.c 2013-01-20 12:58:22.000000000 +0100 @@ -1034,7 +1034,7 @@ if (damage == NULL) return NULL; - if (!RegionNotEmpty(&damage->region)) { + if (RegionNil(&damage->region)) { no_damage: __sna_damage_destroy(damage); return NULL; @@ -1127,7 +1127,7 @@ if (damage == NULL) return NULL; - if (!RegionNotEmpty(&damage->region)) { + if (RegionNil(&damage->region)) { __sna_damage_destroy(damage); return NULL; } @@ -1199,7 +1199,7 @@ if (damage == NULL) return NULL; - if (!RegionNotEmpty(&damage->region)) { + if (RegionNil(&damage->region)) { __sna_damage_destroy(damage); return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_display.c new/xf86-video-intel-2.20.19/src/sna/sna_display.c --- old/xf86-video-intel-2.20.18/src/sna/sna_display.c 2013-01-07 21:22:12.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_display.c 2013-01-20 12:58:22.000000000 +0100 @@ -3203,7 +3203,7 @@ assert(sna->mode.shadow_active); region = DamageRegion(sna->mode.shadow_damage); - if (!RegionNotEmpty(region)) + if (RegionNil(region)) return; if (!sna_pixmap_move_to_gpu(sna->front, MOVE_READ)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_dri.c new/xf86-video-intel-2.20.19/src/sna/sna_dri.c --- old/xf86-video-intel-2.20.18/src/sna/sna_dri.c 2013-01-14 18:09:16.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_dri.c 2013-01-20 12:58:22.000000000 +0100 @@ -457,7 +457,6 @@ pixmap->drawable.width, pixmap->drawable.height); sna_damage_destroy(&priv->cpu_damage); - priv->undamaged = false; } else { sna_damage_subtract(&priv->cpu_damage, region); if (priv->cpu_damage == NULL) @@ -493,7 +492,6 @@ sna_damage_destroy(&priv->cpu_damage); list_del(&priv->list); priv->cpu = false; - priv->undamaged = false; assert(bo->refcnt); if (priv->gpu_bo != bo) { @@ -679,10 +677,15 @@ dst_bo, 0, 0, boxes, n); } else { + unsigned flags; + + flags = COPY_LAST; + if (flush) + flags |= COPY_SYNC; sna->render.copy_boxes(sna, GXcopy, (PixmapPtr)draw, src_bo, -draw->x-dx, -draw->y-dy, pixmap, dst_bo, 0, 0, - boxes, n, COPY_LAST); + boxes, n, flags); DBG(("%s: flushing? %d\n", __FUNCTION__, flush)); if (flush) { /* STAT! */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_driver.c new/xf86-video-intel-2.20.19/src/sna/sna_driver.c --- old/xf86-video-intel-2.20.18/src/sna/sna_driver.c 2013-01-14 18:09:16.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_driver.c 2013-01-20 12:58:22.000000000 +0100 @@ -1141,6 +1141,10 @@ xf86DrvMsg(scrn->scrnIndex, X_INFO, "SNA compiled with assertions enabled\n"); #endif +#if DEBUG_SYNC + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "SNA compiled with synchronous rendering\n"); +#endif #if DEBUG_MEMORY xf86DrvMsg(scrn->scrnIndex, X_INFO, "SNA compiled with memory allocation reporting enabled\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_glyphs.c new/xf86-video-intel-2.20.19/src/sna/sna_glyphs.c --- old/xf86-video-intel-2.20.18/src/sna/sna_glyphs.c 2013-01-02 19:58:39.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_glyphs.c 2013-01-20 12:58:22.000000000 +0100 @@ -1357,7 +1357,7 @@ __FUNCTION__, RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, RegionExtents(®ion)->x2, RegionExtents(®ion)->y2)); - if (!RegionNotEmpty(®ion)) + if (RegionNil(®ion)) return; if (!sna_drawable_move_region_to_cpu(dst->pDrawable, ®ion, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_render.h new/xf86-video-intel-2.20.19/src/sna/sna_render.h --- old/xf86-video-intel-2.20.18/src/sna/sna_render.h 2013-01-06 16:18:15.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_render.h 2013-01-20 12:58:22.000000000 +0100 @@ -242,6 +242,7 @@ PixmapPtr dst, struct kgem_bo *dst_bo, int16_t dst_dx, int16_t dst_dy, const BoxRec *box, int n, unsigned flags); #define COPY_LAST 0x1 +#define COPY_SYNC 0x2 bool (*copy)(struct sna *sna, uint8_t alu, PixmapPtr src, struct kgem_bo *src_bo, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_tiling.c new/xf86-video-intel-2.20.19/src/sna/sna_tiling.c --- old/xf86-video-intel-2.20.18/src/sna/sna_tiling.c 2012-11-06 17:06:00.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_tiling.c 2013-01-20 12:58:22.000000000 +0100 @@ -624,7 +624,7 @@ RegionNull(&this); RegionIntersect(&this, ®ion, &tile); - if (!RegionNotEmpty(&this)) + if (RegionNil(&this)) continue; tmp.drawable.width = this.extents.x2 - this.extents.x1; @@ -737,7 +737,7 @@ RegionNull(&this); RegionIntersect(&this, ®ion, &tile); - if (!RegionNotEmpty(&this)) + if (RegionNil(&this)) continue; w = this.extents.x2 - this.extents.x1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/src/sna/sna_trapezoids.c new/xf86-video-intel-2.20.19/src/sna/sna_trapezoids.c --- old/xf86-video-intel-2.20.18/src/sna/sna_trapezoids.c 2013-01-16 12:48:11.000000000 +0100 +++ new/xf86-video-intel-2.20.19/src/sna/sna_trapezoids.c 2013-01-17 14:48:00.000000000 +0100 @@ -5193,7 +5193,7 @@ struct inplace inplace; inplace.ptr = pixmap->devPrivate.ptr; - inplace.ptr += dst_y * pixmap->devKind + dst_x; + inplace.ptr += dst_y * pixmap->devKind + dst_x * 4; inplace.stride = pixmap->devKind; inplace.color = color; @@ -5988,7 +5988,6 @@ pixmap->drawable.width, pixmap->drawable.height); list_del(&priv->list); - priv->undamaged = false; } else { sna_damage_add_box(&priv->gpu_damage, box); sna_damage_subtract_box(&priv->cpu_damage, box); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/test/Makefile.am new/xf86-video-intel-2.20.19/test/Makefile.am --- old/xf86-video-intel-2.20.18/test/Makefile.am 2012-07-10 10:23:26.000000000 +0200 +++ new/xf86-video-intel-2.20.19/test/Makefile.am 2013-01-20 12:58:22.000000000 +0100 @@ -35,4 +35,11 @@ dri2.h \ $(NULL) -EXTRA_DIST = README +vsync.avi: mkvsync.sh + ./mkvsync.sh $@ + +clean-vsync-avi: + rm -rf vsync.avi .build.tmp + +EXTRA_DIST = README mkvsync.sh +clean-local: clean-vsync-avi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-intel-2.20.18/test/mkvsync.sh new/xf86-video-intel-2.20.19/test/mkvsync.sh --- old/xf86-video-intel-2.20.18/test/mkvsync.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/xf86-video-intel-2.20.19/test/mkvsync.sh 2013-01-20 12:58:22.000000000 +0100 @@ -0,0 +1,27 @@ +#!/bin/bash + +OUT="$1" +[ -n "$OUT" ] || OUT="vsync.avi" + +TMP=".build.tmp" + +rm -rf ${TMP} +mkdir ${TMP} +convert -size 640x480 -depth 24 canvas:black png24:${TMP}/black.png +convert -size 640x480 -depth 24 canvas:white png24:${TMP}/white.png + +mkdir ${TMP}/anim + +for ((a=0; $a < 1000; a=$a+2)); do + ln -s ../black.png ${TMP}/anim/$a.png +done + +for ((a=1; $a < 1000; a=$a+2)); do + ln -s ../white.png ${TMP}/anim/$a.png +done + +mencoder "mf://${TMP}/anim/*.png" -v -vf-clr -mf fps=60 -o "${OUT}" -ovc lavc +exitcode=$? +rm -rf ${TMP} + +exit ${exitcode} -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
