Commit Graph

98 Commits

Author SHA1 Message Date
Michel Dänzer
29586101dc EXA: Only record damage generated by rendering operations.
Recording damage from other operations (e.g. creating a client damage record)
may confuse the migration code resulting in corruption.

Option "EXAOptimizeMigration" appears safe now, so enable it by default. Also
remove it from the manpage, as it should only be necessary on request in the
course of bug report diagnostics anymore.
2008-05-24 20:01:41 +02:00
Michel Dänzer
f6d61d3d86 EXA: Don't migrate twice in exaImageGlyphBlt.
exaPrepareAccess already handles migration.
2008-05-24 20:01:36 +02:00
Michel Dänzer
3baf3b42e0 EXA: Specify region used for source pixmap migration in exaCopyNtoN.
Avoids excessive migration overhead in some pathological cases. See
http://bugs.freedesktop.org/show_bug.cgi?id=15845 .
2008-05-24 20:01:21 +02:00
Tilman Sauerbeck
886af8f384 EXA: Avoid some fallbacks in exaCopyNtoN.
In some cases we can still do the copying in hardware even if the
dimensions of the pixmaps are out of range. This is true when the boxes
that we're to copy are all in the card's range.
2008-04-17 14:28:31 +02:00
Alan Hourihane
57468a696e Fix Line drawing with CapNotLast set in PolySegment. 2008-01-04 12:37:55 +00:00
Daniel Stone
1179ddea94 EXA: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:36:36 +00:00
Daniel Stone
3b77689266 EXA: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:43 +00:00
Pierre Willenbrock
d502521c36 EXA: Fix off-by-one in polyline drawing. 2007-10-23 16:45:13 +02:00
Michel Dänzer
5d74416740 EXA: Don't attempt to move in pixmaps that can't be accelerated.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
2007-10-18 17:44:14 +02:00
Michel Dänzer
3549a12823 EXA: Disable 1x1 pixmap fill optimization for drivers that handle pixmaps.
This reverts commit 1365aeff54.

It defeated the optimization for drivers that don't provide a CreatePixmap
hook. The optimization makes no sense for drivers that do anyway, so disable
it for them completely.
2007-10-04 11:44:03 +02:00
Dave Airlie
1365aeff54 exa: direct access to the pixmap sys ptr is bad if the pixmap isn't mapped 2007-10-03 12:01:42 +10:00
Michel Dänzer
598698678b EXA: Punt for all fallbacks in exaFillRegion*.
Now that PaintWindow is gone, all callers already handle fallbacks.
2007-09-27 13:33:52 +02:00
Michel Dänzer
006f652505 EXA: Make sure tile offsets passed to drivers are never negative.
Thanks to Björn Steinbrink for pointing out the problem on IRC.
2007-09-27 13:30:58 +02:00
Michel Dänzer
da7d9aa1fb EXA: Tile offscreen pixmap coordinate offsets are always 0. 2007-09-27 13:30:48 +02:00
Michel Dänzer
d6f4764bf5 EXA: Remove some clearly bogus code from exaCopyNtoN.
Not sure what I was thinking when I wrote this... it would cause the box
coordinates to be off for exaCopyNtoNTwoDir or fallbacks.

Thanks to Tilman Sauerbeck for pointing out the problem on IRC and testing the
fix.
2007-09-27 13:29:07 +02:00
Michel Dänzer
c7d6d1f589 EXA: Punt on fallback case not handled correctly in exaFillRegionTiled.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=12520 .
2007-09-27 13:20:45 +02:00
Tilman Sauerbeck
ae8b4f7dcf EXA: Added pitch limitations.
Drivers can now specify the max pitches that the accelerator supports.
2007-09-25 16:43:06 +02:00
Michel Dänzer
7ac89060e0 EXA: Don't crash in exaGetImage when swapped out. 2007-09-17 20:39:59 +02:00
Eric Anholt
e4d11e58ce Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
2007-09-13 00:08:53 +00:00
Michel Dänzer
e8093e15c7 EXA: Exclude bits that will be overwritten from migration in exaCopyNtoN.
Also plug a region leak in exaPolyFillRect.
2007-09-07 18:41:33 +02:00
Michel Dänzer
e81af8ba64 EXA: exaFillRegion{Solid,Tiled} improvements.
Use region to exclude bits that will be overwritten from migration.

Also make exaFillRegionSolid use the same logic as exaFillRegionTiled.
2007-09-07 18:41:33 +02:00
Michel Dänzer
5f7da4da8d EXA: Use exaShmPutImage for pushing glyphs to scratch pixmap in exaGlyphs. 2007-09-07 18:41:33 +02:00
Michel Dänzer
be922b3048 EXA: exa(Shm)PutImage improvements.
Improve exaShmPutImage performance and reuse its core in exaPutImage as it
seems faster than the previous code when the driver doesn't provide an
UploadToScreen hook.

Make sure all damage records are notified of the damage incurred by actual
ShmPutImage calls.

Remove superfluous manual damage tracking for actual PutImage calls.
2007-09-07 18:41:33 +02:00
Michel Dänzer
ea92ea4156 EXA: exaGetImage improvements.
Use the new migration infrastructure to cache FB bits we need in the system
copy, for the benefit of repeated calls.
2007-09-07 18:41:32 +02:00
Michel Dänzer
aa2ed73e0e EXA: Remove superfluous manual damage tracking.
These should all be covered by damage wrappers.
2007-09-07 18:41:32 +02:00
Michel Dänzer
1f457ff3db EXA: Improvements for 1x1 pixmaps.
Initialize system and FB copy in exaFillRegionSolid and adapt
exaGetPixmapFirstPixel to the new migration infrastructure.

This should mostly eliminate migration overhead for these, whether they are
used for acceleration or fallbacks.
2007-09-07 18:41:31 +02:00
Michel Dänzer
489bc7551f EXA: exaImageGlyphBlt improvements.
As we can't actually accelerate anything interesting here, just migrate out
once and call fbSolidBoxClipped instead of taking a round trip via offscreen
memory with exaSolidBoxClipped.

Reuse pending damage region for extents and to prevent any actual migration of
pixmap contents when we're overwriting the whole pending damage region.

Remove superfluous manual damage tracking.
2007-09-07 18:41:31 +02:00
Michel Dänzer
6c9d7ed61b EXA: Hide pixmap pointer outside of exaPrepare/FinishAccess whenever possible.
We finally want to catch all cases where the pixmap pointer is dereferenced
outside of exaPrepare/FinishAccess.

Also fix a couple of such cases exposed by this change.
2007-09-07 18:41:30 +02:00
Michel Dänzer
962eddd7a2 EXA: Support partial migration of pixmap contents between Sys and FB.
The initiator of migration can pass in a region that defines the relevant area
of each source pixmap or the irrelevant area of the destination pixmap. By
default, the pending damage region is assumed relevant for the destination
pixmap, and everything for source pixmaps.

Thanks to Jarno Manninen for reassuring me that my own ideas for this were
feasible and for providing additional ideas.
2007-09-07 18:41:30 +02:00
Michel Dänzer
8cfcf9973c EXA: Migrate out pixmap in exaPrepareAccess.
Also fix exaFinishAccessGC not to use the same index for tile and stipple.
2007-09-07 18:41:29 +02:00
Michel Dänzer
b9a806f0b3 exaPolyFillRect: pGC->alu doesn't matter with a single rectangle. 2007-08-24 19:04:55 +02:00
Michel Dänzer
d0f0d1092c exaGetImage: Don't migrate pixmap out of FB with no DownloadFromScreen hook.
Based on the assumption that GetImage is relatively rare, so the overhead of
the migration is probably bigger than any potential savings.
2007-08-24 14:10:13 +02:00
Michel Dänzer
5d9e2c2821 EXA: Improve ShmPutImage.
Share as much code with exaPutImage as possible, and fall back to fbShmPutImage
when that fails.
2007-08-24 14:03:14 +02:00
Michel Dänzer
c9b79a3558 exaPolyFillRect: Don't track damage explicitly.
All callers should already do it.

Also don't leak pReg.
2007-06-20 18:56:06 +02:00
Michel Dänzer
87966c5d28 exaGetImage: Don't migrate or try to accelerate for 1x1.
This is mainly to avoid wasting effort for XSync(), but just reading a single
pixel directly is probably faster than DownloadFromScreen anyway. Though in
light of the latter, even larger thresholds might be useful.

Also move the swappedOut check before the migration checks because migration
can't actually occur when swapped out.
2007-06-20 18:46:03 +02:00
Michel Dänzer
b1b6674a91 EXA: FillSpans improvements.
* Don't need to track damage.
* Always migrate for fallbacks.
2007-04-29 23:49:28 +02:00
Michel Dänzer
584697a223 EXA: SolidBoxClipped improvements.
* Centralize handling of fallbacks and damage tracking.
* Always migrate for fallbacks.
2007-04-29 23:49:09 +02:00
Michel Dänzer
982d7c2c0b EXA: CopyNtoN improvements.
* Centralize handling of fallbacks and damage tracking.
* Always migrate for fallbacks.
2007-04-29 23:48:59 +02:00
Michel Dänzer
d2245386ee EXA: GetImage improvements.
Only migrate when appropriate. In particular, don't migrate to offscreen in the
no-fallback case as copying from system memory should usually be as fast if not
faster than DownloadFromScreen, in particular if the bits need to be uploaded
to offscreen first.
2007-04-29 23:48:31 +02:00
Michel Dänzer
0880aaac9c EXA: PutImage improvements.
* Migrate for fallbacks when appropriate.
* Add damage tracking in ExaCheckPutImage.
2007-04-29 23:48:19 +02:00
Michel Dänzer
7fca169011 EXA: ImageGlyphBlt improvements.
* Don't waste effort on invisible glyphs.
* Only track damage for bounding box instead of each glyph separately.
* Always migrate for fallbacks.
2007-04-29 23:48:11 +02:00
Michel Dänzer
0c8905ebc9 EXA: PolyFillRect improvements.
* Convert rects to region and use it for damage tracking.
* When possible, defer to exaFillRegion{Solid,Tiled} using converted region.
* Always migrate for fallbacks.
* Move damage tracking out of ExaCheckPolyFillRect.
2007-04-29 23:47:08 +02:00
Michel Dänzer
567f18a09b EXA: FillRegion{Solid,Tiled} improvements.
* Support planemasks, different ALUs and arbitrary tile origin.
* Leave damage tracking and non-trivial fallbacks to callers.
* Always migrate for fallbacks.

This is in preparation for using these from more other functions.
2007-04-29 23:46:49 +02:00
Eric Anholt
81aa7f059d Add missing dirty marking in a couple of fallback cases in the exaGlyphs path. 2007-02-14 12:48:15 -08:00
Michel Dänzer
9563b2eea2 EXA: Lots of damage tracking fixes.
Mostly due to exaDrawableDirty() now calculating the backing pixmap coordinates
internally, for cases where they aren't trivially known. There's a new
exaPixmapDirty() function for the other cases.
2006-12-19 18:57:22 +01:00
Michel Dänzer
4334860e69 Merge branch 'master' into exa-damagetrack
Conflicts:

	exa/exa_accel.c
	exa/exa_migration.c
2006-12-19 16:29:26 +01:00
Michel Dänzer
fdcc22ca17 exaCopyNtoN: Fix usage of 'dx' and 'dy' instead of 'reverse' and 'upsidedown'. 2006-12-19 16:11:17 +01:00
Michel Dänzer
67c2a86e59 EXA: Compare backing pixmaps instead of drawables against driver limits.
The driver operations are always contained within the backing pixmaps, it
doesn't matter if the drawables are bigger.
2006-12-19 15:44:18 +01:00
Michel Dänzer
f9f33b72e3 Track per-drawable damage to minimize UTS and DFS transfers.
Based on work by Eric Anholt.
2006-06-12 20:19:11 +02:00
Adam Jackson
291e89d4f2 Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. 2006-04-30 19:16:14 +00:00