Commit Graph

362 Commits

Author SHA1 Message Date
Aaron Plattner
f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08:00
Eamon Walsh
b633d54b94 Merge branch 'master' into XACE-SELINUX
Conflicts:

	GL/glx/glxscreens.c
	hw/xnest/Screen.c
	render/glyph.c
	render/glyphstr.h
	render/render.c
2007-10-25 12:19:30 -04:00
Pierre Willenbrock
d502521c36 EXA: Fix off-by-one in polyline drawing. 2007-10-23 16:45:13 +02:00
Eric Anholt
4b14c9a9cd Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code.
Not all of the DDX/miext Glyphs hook implementations have been removed, but
they should be.
2007-10-19 16:34:54 -07:00
Eric Anholt
a3a95d3475 Merge branch 'master' into glyph-pixmaps
Conflicts:

	configure.ac
2007-10-19 15:44:17 -07:00
Michel Dänzer
ce50bfd336 EXA: Skip empty glyphs. 2007-10-18 17:44:48 +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
Eamon Walsh
c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Dodji Seketeli
6aab6a6e2a EXA: dude, don't validation driver hooks twice ! 2007-10-08 13:25:38 +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
Dodji Seketeli
604ebb5a6d Merge Xephyr-XV/GL stuff into master 2007-10-03 16:14:08 +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
Dave Airlie
566dd3b7d7 exa: add new flags to denote driver handles all pixmap migration/hiding 2007-10-03 12:01:37 +10:00
Dave Airlie
1df1fee82d exa: make sure we set fb_ptr to NULL 2007-10-03 11:56:04 +10:00
Eric Anholt
439edc768e Merge branch 'glyph-pixmaps'
Conflicts:

	configure.ac
	exa/exa_render.c
2007-10-02 12:14:04 -07:00
Dodji Seketeli
95fadbd402 Add basic Exa driver entry point validation.
In exaDriverInit(), quickly check if the programmer forgot to set some
mandadory driver hooks, in that case display a meaningful error message.
2007-10-02 16:45:01 +02:00
Dave Airlie
dc90d50008 exa: increase minor version number for pixmap allocation hooks 2007-10-02 14:05:07 +10:00
Kristian Høgsberg
f15af2ae60 exa: only setup offscreen allocator if driver doesn't provide CreatePixmap 2007-10-02 14:03:48 +10:00
Dave Airlie
ffb58f4fa8 exa: add hooks for drivers to take over pixmap allocation
This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe
ader.

It allocates a 0 sized pixmap using fb and calls the driver routine to do
work of allocating the actual memory.

ModifyPixmapHeader is mainly required for hooking the screen pixmap which
isn't create by normal methods
2007-10-02 14:03:39 +10:00
Dave Airlie
31555af000 exa: add a pixmap private pointer for drivers to retrieve. 2007-10-02 13:57:55 +10:00
Tilman Sauerbeck
cfe549d1ba EXA: Added back the maxPitchPixels initialization code.
This doesn't add real value yet, but it will be useful once I add code
that splits large render operations into smaller parts if necessary.
2007-09-27 22:36:52 +02:00
Michel Dänzer
6d5c1e0d89 EXA: Remove bogus pitch checks.
exaCreatePixmap should handle all cases correctly.
2007-09-27 13:35:23 +02: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
Eamon Walsh
27612748e0 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/devices.c
2007-09-26 07:47:29 -04:00
Tilman Sauerbeck
56ffc381d3 EXA: Removed duplicated exaGetDrawablePixmap() calls. 2007-09-26 16:52:27 +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
Tilman Sauerbeck
edd8817083 EXA: Check ABI compatibility earlier.
If the driver isn't compatible to the server, all bets are off anyway wrt
the contents of the fields that we're validating, which can lead to bogus
error messages.
2007-09-22 13:52:56 +02:00
Eamon Walsh
97c150b61b Merge branch 'master' into XACE-SELINUX
Conflicts:

	afb/afbpntwin.c
	afb/afbscrinit.c
	afb/afbwindow.c
	cfb/cfb.h
	cfb/cfballpriv.c
	cfb/cfbscrinit.c
	cfb/cfbwindow.c
	configure.ac
	fb/wfbrename.h
	hw/xfree86/xf4bpp/ppcIO.c
	hw/xfree86/xf4bpp/ppcPntWin.c
	hw/xfree86/xf4bpp/ppcWindow.c
	hw/xfree86/xf8_32bpp/cfbscrinit.c
	mfb/mfb.h
	mfb/mfbpntwin.c
	mfb/mfbscrinit.c
	mfb/mfbwindow.c
	mi/miexpose.c

Note: conflicts caused by devPrivates rework vs. paintwindow changes.
2007-09-19 07:25:55 -04:00
Michel Dänzer
547ad2125e EXA: Make sure driver hooks get correct offscreen offsets from exaCopyDirty.
This should ensure the driver UploadTo/DownloadFromScreen hooks can always
work as intended.
2007-09-17 20:40:13 +02:00
Alan Hourihane
56cc24ffb2 EXA: Don't crash in ExaCheckPolyArc.
See https://bugs.freedesktop.org/show_bug.cgi?id=12286 .
2007-09-17 20:40:06 +02:00
Michel Dänzer
7ac89060e0 EXA: Don't crash in exaGetImage when swapped out. 2007-09-17 20:39:59 +02:00
Tilman Sauerbeck
3876c6c805 EXA: Fixed compiler warnings. 2007-09-17 18:47:45 +02:00
Tilman Sauerbeck
d5738ff2e0 EXA: Added missing exaPrepare/FinishAccess calls in ExaCheckPushPixels. 2007-09-17 17:42:55 +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
a634c9b034 EXA: RENDER improvements.
Exclude bits that will be overwritten from migration.

Use exaGlyphs even when Composite can't be accelerated, to avoid PolyFillRect
roundtrip via offscreen memory.

Initialize mask pixmap in exaGlyphs in FB in addition to system if the driver
provides Composite hooks to avoid migration overhead.

Remove manual damage tracking where superfluous.
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
2e0895a4ba EXA: Improvements for trapezoids and triangles.
Only migrate once in exaTrapezoids/Triangles instead of every time in
exaRasterizeTrapezoid/AddTriangles. Adapt manual damage tracking to new
infrastructure.

Also move definition of NeedsComponent() closer to where it's used.
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
5c7ee3f47f EXA: Track valid bits in Sys and FB separately.
Also consolidate exaCopyDirtyToFb/Sys.
2007-09-07 18:41:29 +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
Dave Airlie
e510a77ba4 EXA: Add a couple of missing exaPrepare/FinishAccess calls. 2007-09-07 18:41:29 +02:00
Eamon Walsh
4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Adam Jackson
ae7f71a8b3 Implement core protocol backing store exclusively in terms of Composite.
Composite's automatic redirection is a more general mechanism than the
ad-hoc BS machinery, so it's much prettier to implement the one in terms
of the other.  Composite now wraps ChangeWindowAttributes and activates
automatic redirection for windows with backing store requested.  The old
backing store infrastructure is completely gutted: ABI-visible structures
retain the function pointers, but they never get called, and all the
open-coded conditionals throughout the DIX layer to implement BS are gone.

Note that this is still not a strictly complete implementation of backing
store, since Composite will throw the bits away on unmap and therefore
WhenMapped and Always hints are equivalent.
2007-08-25 15:08:20 -04: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
c19f227b46 EXA: Only mark offscreen memory as used when it really is. 2007-08-24 13:05:52 +02:00
Eric Anholt
bc2d516f16 Fix overly-restrictive integer overflow check in EXA pixmap creation.
The result was that at 32bpp, pixmaps of width 8192 or greater couldn't be
created, due to treating a pitch value as a width.
2007-08-22 08:59:10 -07:00
Fredrik Höglund
3c448b0eb6 EXA: Fix a couple of logic errors in exaGetPixmapFirstPixel.
The fb pointer would be left uninitialized when exaPixmapIsOffscreen
returned false. When it returned true and the pixmap was damaged,
fb would be initialized from the pixmap's devPrivate.ptr before the
exaDoMigration and exaPrepareAccess calls, at which point
devPrivate.ptr would still be pointing at offscreen memory.
2007-08-18 19:02:18 +02:00
Fredrik Höglund
daee59b170 EXA: Wrap Trapezoids to prevent excessive migration of the alpha pixmap.
miTrapezoids creates an alpha pixmap and initializes the contents
using PolyFillRect, which causes the pixmap to be moved in for
acceleration. The subsequent call to RasterizeTrapezoid won't be
accelerated by EXA, which causing the pixmap to be moved back out
again.

By wrapping Trapezoids and using ExaCheckPolyFillRect instead of
PolyFillRect to initialize the pixmap, we avoid this roundtrip.
2007-08-16 23:49:07 +02:00
Carl Worth
0a71e1542a Create a Picture as well as a Pixmap at the time of AllocateGlyph
This avoids some inefficiency in creating a temporary Picture
for every glyph at rendering time. My measurements with an i965
showed the previous patch causing a 10-15% slowdown for NoAccel
and XAA cases, (while providing an 18% speedup for EXA).

With this change, the NoAccel and XAA performance regression is
eliminated, and the overall EXA speedup, (before any of the
glyphs-as-pixmaps work), is now 32%.
2007-08-02 22:49:56 -07:00
Carl Worth
a2af34d5a8 Use per-screen Pixmaps for glyphs
Instead of system-memory data which prevents accelerated
compositing of glyphs, (at least without forcing an upload
of the glyph data before compositing).
2007-08-02 22:49:56 -07:00
Adam Jackson
486fd4145a exaGetPixmapFirstPixel: avoid framebuffer readbacks if possible.
If the pixel in framebuffer memory isn't modified since we uploaded it, we
can just read from the system memory copy, wihch avoids both a readback and
an accelerator stall.

In principle this function is still wrong, and all the framebuffer pixel
access should be going through (w)fb so we can get pixel layout corrections.
2007-07-27 13:10:39 -04:00
Dodji Seketeli
5657fb065c exaDriverInit: Fail if pScreenInfo or a member of it is invalid.
EXA may attempt to use the invalid value and crash otherwise.
2007-07-17 12:12:02 +02:00
Dodji Seketeli
2a75c77497 ExaOffscreenMarkUsed: Don't crash when there's no offscreen memory. 2007-07-03 11:00:29 +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
cc648e609d EXA: Export ExaOffscreenMarkUsed.
Can be used to inform EXA that an offscreen area is used outside of EXA.
2007-05-22 10:51:56 +02:00
Jesse Barnes
1b3a0508a7 Fix documentation for Copy hook -- it can copy memory to the scanout
buffer too.
2007-05-06 01:30:59 -07:00
Michel Dänzer
3c91a993e8 EXA: Fix OffscreenValidate build with DEBUG_OFFSCREEN enabled. 2007-04-29 23:49:41 +02:00
Michel Dänzer
a261e13250 EXA: Remove DrawableDirty.
Convert the remaining callers to PixmapDirty.
2007-04-29 23:49:35 +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
a8d6ebdf93 EXA: Defer to FillRegionTiled in Composite when possible.
Committed separately as this case is hard to hit and has only been tested
lightly.
2007-04-29 23:47:53 +02:00
Michel Dänzer
81b055605c EXA: Composite improvements.
* Defer to simpler hooks in more cases (inspired by XAA behaviour).
* Move damage tracking from lower to higher level functions.
* Always migrate for fallbacks.
2007-04-29 23:47:43 +02:00
Michel Dänzer
ce317a5b76 EXA: Glyphs improvements.
* Don't waste effort on invisible glyphs.
* Add damage tracking where necessary.
* Always migrate for fallbacks.
2007-04-29 23:47:16 +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
Michel Dänzer
e869573b52 EXA: exaAssertNotDirty improvements.
* Return early if the valid region is empty or the pixmap is pinned.
* Fix loop for several cliprects.
2007-04-29 23:45:48 +02:00
Michel Dänzer
d3f8667341 EXA: Fix exaEnableDisableFBAccess for nested disables and enables. 2007-04-29 23:44:27 +02:00
Michel Dänzer
2866e0bac9 Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. 2007-04-29 23:38:13 +02:00
Thomas Hellstrom
f8482967ae Add an EXA driver callback to determine whether a pixmap is
"offscreen" in exa terms, which means accessible to the GPU.
Bump exa minor. The change is backwards-compatible.
2007-04-04 14:04:52 +02:00
Eric Anholt
6ed08949af Move libcw setup to the only renderer requiring it (XAA).
Additionally, protect libcw setup behind checks for Render, to avoid
segfaulting if Render isn't available (xnest).

The previous setup was an ABI-preserving dance, which is better nuked now.
Now, anything that needs libcw must explicitly initialize it, and
miDisableCompositeWrapper (previously only called by EXA and presumably binary
drivers) is gone.
2007-03-27 17:31:28 -07: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
Eric Anholt
a5f19c5150 Mark sync when UploadToScreen succeeds in exaGlyphs(). 2007-02-14 11:13:21 -08:00
Eric Anholt
7a12952fd4 Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA.
This is a new behavior for version 2.1 of EXA, and only takes effect if the
driver has requested that.  Otherwise, the previous behavior remains the same.
2007-01-24 13:34:58 -08:00
Eric Anholt
083b790515 Switch the default migration heuristic for EXA to "always".
This has been what has been used the most successfully post-damagetrack.
The current thinking is that:
1) We should be able to accelerate basically everything.  So we don't need to
   try to migrate trees of pixmaps permanently out of framebuffer to speed
   CPU drawing up.
2) Migration is cheaper in the thrashing case, so we don't want to go to a lot
   of effort to try (and fail badly) to find a working set.
2006-12-28 13:21:25 -08:00
Eric Anholt
cfbc7379f0 Export exaMove{In,Out}Pixmap(). 2006-12-28 13:15:11 -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
George Sapountzis
467c00cf45 exaGlyphs: mark dirty for software path also.
This affects drivers with no UploadToScreen or UploadToScreen failures.
2006-12-19 18:45:25 +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
Eric Anholt
6b1e354dbb EXA: Disable SHM pixmaps.
See https://bugs.freedesktop.org/show_bug.cgi?id=6772 .
2006-12-19 15:24:19 +01:00
Michel Dänzer
7e4717683d exaDrawableDirty: Fix initialization of BoxRec.
This will hopefully fix the partial window corruption experienced by some
people.
2006-10-15 18:12:28 +02:00
George Sapountzis
37943e2f1a Call exaTryComponentAlphaHelper() for solid src also.
Also, rename to exaTryMagicTwoPassCompositeHelper() as it is now called for
non-component-alpha masks also, and add function description from
http://anholt.livejournal.com/32058.html.
2006-08-12 20:54:33 +03:00
Daniel Stone
68b0678254 exa: only disable cw when COMPOSITE is built 2006-07-21 15:18:20 -04:00
Daniel Stone
84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Eric Anholt
7106a77df3 Fix bugs in support for new repeatTypes in XAA and EXA.
EXA now won't pass pictures with new repeatTypes to drivers.  We can add a flag
for them to support it at a later time.
2006-07-03 16:41:44 +02:00
Jens Granseuer
179737d4a0 Bug 7145: fix build with gcc 2.95 & other c89 compilers
Move variable declarations to start of blocks as required by c89
2006-06-30 15:56:40 -07:00
Eric Anholt
48c871564d Move EXA_PM_IS_SOLID() to the public API, since drivers will want it frequently. 2006-06-26 15:57:32 +02:00
George Fufutos
afb84c2fca Bug #6911: Check return value of exaGetPixelFromRGBA(). 2006-06-24 15:23:14 +02:00
Michel Dänzer
930b9a069a Bug #6818: Avoid infinite loop in exaLog2() with negative arguments. 2006-06-24 15:21:17 +02:00
Eric Anholt
520c80f4b8 Don't forget to step the rows when verifying the equivalence of fb/sys areas.
This is only used by fakexa, but we would have missed some errors without this
fix.
2006-06-19 15:11:55 -07:00
Eric Anholt
6aaf0e5b58 Add options to disable EXA acceleration for Composite/UTS/DFS, and always print
out how much memory EXA is managing for offscreen pixmaps.
2006-06-18 19:47:51 -07: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
Alan Coopersmith
1e8a594957 Fix Solaris build with Sun compilers to work when exa is built before
hw/xfree86/os-support/solaris (as it is by default now).
2006-05-02 01:37:25 +00:00
Adam Jackson
291e89d4f2 Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. 2006-04-30 19:16:14 +00:00
Eric Anholt
fdcacc5a4b Add Polylines and PolyPoint acceleration as well. This is primarily to
clean up fallback debugging output, so I can focus on more imporant
    cases. Performance is comparable but without hardware stalls, and
    passes Xlib9.
2006-04-28 03:27:12 +00:00
Eric Anholt
005529a1c9 Correct some bugs causing performance issues in the "Smart" scheme. 2006-04-28 03:26:30 +00:00
Eric Anholt
8738bc295b Improve EXA fallback debugging output to include the locations of pixmaps.
This is being used in tracking down recent compositing performance
    regressions.
2006-04-27 20:27:27 +00:00
Eric Anholt
83b061776a Add trivial PolySegment acceleration for 0-width horizontal/vertical lines,
which still happen somewhat frequently and were cluttering up my
    fallback debugging output. x11perf says it's a major performance win in
    those cases (though probably irrelevant), and it passes Xlib9.
2006-04-27 19:17:34 +00:00
Eric Anholt
69164ec00c In drawing glyphs, shortcut our way to exaComposite instead of going
through the whole CompositePicture stack and doing things like
    computing damage over again. This is a sizeable win for text drawing
    with a compmgr. Also avoid calling down into the server for dealing
    with the scratch pixmap when we are able to do UploadToScreen
    successfully and never need it.
2006-04-27 02:15:19 +00:00
Eric Anholt
3d4ca57b69 Add a helper for the Component Alpha Over case, which breaks the operation
down into an OutReverse and an Add. Turn off the fallback to software
    glyphs when component alpha, now that we expect all (new) drivers to be
    able to support it. Also, make Xephyr fall back in the CA Over case to
    exercise this code. This speeds up my rgb24text and ls -lR in
    gnome-terminal by a factor of 5.
2006-04-26 18:27:40 +00:00
Eric Anholt
6d156c0440 Improve the migration debugging output. 2006-04-26 01:33:15 +00:00
Eric Anholt
eaed7545a2 Fix a bug in the intersection computation that could concievably cause
incorrect results to be returned (but would probably usually be
    over-conservative).
2006-04-26 01:32:55 +00:00
Eric Anholt
5d00859c6e Bug #4668: Check if the lists of glyphs don't have any intersecting glyphs,
and if they all have a maskFormat matching the format of the actual
    glyphs If so, we can avoid the temporary pixmap for accumulating
    glyphs, which reduces the number of operations done, and makes it
    easier on the migration system. This fixes some significant performance
    issues, particularly with subpixel antialiasing. Note that it does
    increase the amount of damage computation which is done, so is not
    always a win with a compositing manager running.
2006-04-25 23:56:17 +00:00
Eric Anholt
074dc9a023 Add an option to verify at the point of migration that pixmaps which aren't
marked dirty are in fact not dirty. This will hopefully help catch
    issues like the previous commit. Leave it on in fakexa.
2006-04-25 16:47:23 +00:00
Eric Anholt
702d9226d5 Don't forget to mark the drawable as dirty in exaPutImage(). Fixes
corruption with drivers that have UTS. (Michel Dänzer)
2006-04-25 15:46:04 +00:00
Eric Anholt
b17a4de83e Add a new migration scheme, called "Smart" for lack of a better name. This
one behaves somewhat between Greedy and Always. It moves in if we can
    accelerate, unless the destination is clean and shouldn't be kept in
    framebuffer according to the score, in which case we migrate out (and
    force-migrate anything where migration is free). This should help fix
    lack of acceleration for drivers without UTS since removing
    exaAsyncPixmapGCOps, and has removed one performance trap with Radeon
    I'd noticed. It is the new default.
2006-04-18 19:14:07 +00:00
Eric Anholt
771b366abe Fix exaGetPixmapFirstPixel to migrate as unaccelerated. Also adds a bit of
fallback debugging info to PolyGlyphBlt.
2006-04-18 18:50:35 +00:00
Donnie Berkholz
0f065059dc Wrap a couple more SDK headers in if XORG, as per Dave Airlie's commit on
2006-01-18.
2006-04-17 07:27:43 +00:00
Eric Anholt
ccca76b808 Clean up warnings and a debug printf. 2006-04-01 23:41:23 +00:00
Eric Anholt
6afa814ab1 Pull out fb's tile handling during fbValidateGC so we can do the necessary
exaPrepare/FinishAccess()es. Revealed by xtest with fakexa.
2006-04-01 23:28:17 +00:00
Eric Anholt
5f95146fcf Export exaPrepare/FinishGC to the rest of EXA, and use it in the ImageGlyph
implementation to avoid unprepared access to the tile. Also, relocate
    the fbGetDrawable to avoid using a stale dest pointer after
    exaSolidBoxClipped() may have migrated it. Revealed by xtest.
2006-04-01 22:35:16 +00:00
Eric Anholt
c720ffe875 Use fb's depth-to-planemask computation, which doesn't suffer from getting
a 1 planemask at depth 32. Fixes Get/PutImage xtest tests.
2006-04-01 22:17:44 +00:00
Eric Anholt
d1e90113fc Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new
gradient testing in rendercheck.
2006-03-31 23:22:29 +00:00
Eric Anholt
2e38fedd29 Add an option to EXA for the DDX to request that EXA hide the pixmap's
devPrivate.ptr when pointing at offscreen memory, outside of
    exaPrepare/FinishAccess(). This was used with fakexa to find (by NULL
    dereference) many instances of un-Prepared CPU access to the
    framebuffer:
- GC tiles used in several ops when fillStyle == FillTiled were never
    Prepared.
- Migration could lead to un-Prepared access to mask data in render's
    Trapezoids and Triangles
- PutImage's UploadToScreen failure fallback failed to Prepare.
2006-03-31 19:41:28 +00:00
Eric Anholt
f480dc797b Revert mistaken commit to exa_unaccel.c. Should have been to
exa_offscreen.c: Correct a typo in debug-only offscreen validation
    code. (Wang Zhenyu)
2006-03-31 19:25:42 +00:00
Eric Anholt
1a8167c1ba Correct a typo in debug-only offscreen validation code. (Wang Zhenyu) 2006-03-31 19:16:51 +00:00
Eric Anholt
759033703c Remove the exaAsyncPixmapGCOps mostly-unaccelerated ops vector, and always
plug in the accelerated one, even if the destination pixmap is
    currently offscreen. This was a leftover from when kaa originally got
    accelerated offscreen pixmap support, and its only concievable use was
    to avoid a little overhead on ops to in-system pixmaps that weren't
    going to get migrated. At this point, we probably care more about just
    getting everything accelerated that we easily can, which should happen
    with the new migration support.
2006-03-30 21:44:36 +00:00
Eric Anholt
b9203dc068 Don't do an extra fallback path for CopyWindow while swappedOut, since
exaCopyNtoN takes care of the fallback anyway, and we don't care about
    the performance of this path.
2006-03-30 21:25:43 +00:00
Eric Anholt
2153fa9748 Bug #2986: Add PutImage acceleration for the ZPixmap, planeMask ~=
FB_ALLONES, bitsPerPixel >= 8, GXcopy cases. With the radeon driver on
    my machine, this gives about 10% speedup in PutImage
10x10 and 500x500, and 40% speedup for 10x10 ShmPutImage, up to 65%
    improvement in 500x500 ShmPutImage. Also fixes a crasher in GetImage
    that slipped in at the last minute.
2006-03-30 05:24:27 +00:00
Eric Anholt
e799dd68e2 Bug #2986: Add acceleration of GetImage using DownloadFromScreen for the
ZPixmap, planeMask ~= FB_ALLONES, bitsPerPixel >= 8 case. I'm pretty
    convinced that this is the only case that we care about at all. Tested
    with xwd -root and xwd on a gnome-terminal, in a composited environment
    or not.
2006-03-29 22:25:17 +00:00
Eric Anholt
14aafc258c Change EXA so that exaMoveOutPixmap() retains the framebuffer copy of the
pixmap, and damage is tracked so that a later exaMoveInPixmap won't
    result in an upload if no upload is necessary. This will likely improve
    the performance of the "Always" migration scheme significantly, and is
    a step in the path to more exact damage tracking between framebuffer
    and system memory.
2006-03-16 18:43:55 +00:00
Eric Anholt
c74464d92c Don't let pinned pixmaps get migrated in when using the "Always" migration
scheme. This notably keeps the visible screen from getting migrated in
    to a new location in framebuffer.
Reported by: Michel Dänzer.
2006-03-15 16:59:45 +00:00
Eric Anholt
c1601717d5 Add a new migration scheme, "always", which will move pixmaps to their
desired location always (unless they don't fit in FB, in which case
    they all get moved out for software rendering). The default remains as
    before, but can be controlled by the MigrationHeuristic xorg.conf
    option (which is intentionally not documented, as it may be
    short-lived). This is part of the exa-damagetrack work, which appears
    stable in testing with fakexa, unlike the work as a whole.
2006-03-15 01:20:08 +00:00
Eric Anholt
a90cff266c Add more doxygen documentation, including notes on WaitMarker() and
MarkSync() that I noticed were needed while reading the VIA driver.
2006-03-15 00:13:52 +00:00
Eric Anholt
693e42114f Move migration logic to a new function, exaDoMigration(). This is largely a
manual conversion to allow for different migration schemes to be
    implemented reasonably, but does include some minor improvements such
    as accounting for pinned pixmaps not being acceleratable, and for our
    current GetImage and GetSpans not being accelerated.
2006-03-14 21:30:12 +00:00
Eric Anholt
d309054780 Pull code for getting the (0,0) pixel from a pixmap out to a separate
function, since it gets repeated (with bad error handling, in one
    case).
2006-03-14 20:38:06 +00:00
Eric Anholt
9ed3463450 Improve doxygen formatting, and attempt to clarify the 1:1 ratio of
successful PrepareCopy()s to DoneCopy()s.
2006-03-12 03:04:52 +00:00
Eric Anholt
9a7fba5fd0 Make exaCopyNtoNTwoDir() call DoneCopy() at the end of each string of
consecutive Copy() calls (rather than exactly once at the end of the
    function).
Reviewed by: jbarnes
2006-03-12 03:02:26 +00:00
Eric Anholt
5b1a7b478f Move the exaDrawableDirty in exaPrepareAccess to exaFinishAccess, which is
after the drawing is done. Previously, a failed PrepareAccess could
    have migrated and cleared the dirty flag before the damage was ever
    done.
2006-03-10 21:32:34 +00:00
Eric Anholt
2bd4110549 Document the restriction on PrepareAccess() failure, from discussion with
benh.
2006-03-10 07:45:25 +00:00
Eric Anholt
7a0f7f7398 Coverity #349: Fall back to software early if pSrc->pDrawable is NULL, or
pMask is non-NULL but pMask->pDrawable is NULL. This prevents NULL
    dereferences on gradients and other Pictures which have no pDrawable.
2006-03-09 23:29:44 +00:00
Eric Anholt
ab35c3fbc1 Do a first pass of doxygen documentation of EXA. This removes the
corresponding pieces of exa-driver.txt, which were becoming stale.
    Hopefully the documentation will stay much more up-to-date this way.
    Many thanks to jbarnes for writing exa-driver.txt which was used a lot
    in writing this documentation.
2006-03-09 23:18:15 +00:00
Eric Anholt
2822cbc1fb Rearrange EXA driver structures so that there's a hope of maintaining ABI
when extending the driver interface. The card and accel structures are
    merged into the ExaDriverRec, which is to be allocated using
    exaDriverAlloc(). The driver structure also grows exa_major and
    exa_minor, which drivers fill in and have checked by EXA
    (double-checking that the driver really did check that the EXA version
    was correct). Removes exaInitCard(), which is replaced by the driver
    filling in the rec by hand, and the exaGetVersion() and related
    EXA_*VERSION which are replaced by always using the XFree86 loadable
    module versioning.
2006-03-09 06:04:07 +00:00
Jesse Barnes
044a3abb38 Add accelerated two directional blt support to EXA 2006-03-01 16:28:34 +00:00
Jesse Barnes
e7f0b84fa7 fix exaInitCard by making it a real function 2006-02-28 05:20:20 +00:00
Adam Jackson
5d9a620726 Remove redundant composite op reduction, done in Render now. 2006-02-23 19:25:57 +00:00
Eric Anholt
dc0354104c Move EXA implementation up to the top level and remove its XFree86
dependencies. It was nearly abstract enough already to be used by
    multiple DDXes. This will be useful for EXA development through
    providing a fake acceleration implementation within Xephyr, so that
    testing can be done on new EXA code without worrying about buggy
    drivers.
2006-02-16 00:14:11 +00:00
Alan Coopersmith
d6337c8324 <sys/limits.h> -> <limits.h> so we can compile on non-BSD OS'es 2006-02-11 17:42:31 +00:00
Eric Anholt
c3d1403672 Remove libcwrapper usage from xorg server modules. The libcwrapper is only
of (marginal) use in the drivers, and that usage remains.
2006-02-10 22:00:30 +00:00
Eric Anholt
5e2a7af23b Move the frequently-repeated code to get the pixmap that backs a drawable
to a new function, exaGetDrawablePixmap().
2006-02-02 21:07:06 +00:00
Eric Anholt
ee3c7ccb17 Remove more debugging leftovers. 2006-02-02 20:51:54 +00:00
Eric Anholt
3366b68365 Rearrange and rename EXA code to be a bit more logically organized. Also
removes a little bit of debugging leftovers. Summary:
exa.c -> exa.c (miscellaneous code) exa_accel.c (all acceleration code)
    exa_migration.c (migration logic) exaasync.c -> exa_unaccel.c (software
    fallbacks) exapict.c -> exa_render.c (render extension stuff)
    exaoffscreen.c -> exa_offscreen.c exaPriv.h -> exa_priv.h
2006-02-02 20:09:14 +00:00
Kevin E Martin
7c00afd0ec Define XFree86Server only where it is required. 2005-12-02 06:02:45 +00:00
Kevin E Martin
da5d66f2ff Fix usage of XFree86LOADER/XFree86Module/IN_MODULE and update loadable
module builds to reflect this change.
2005-11-29 16:39:33 +00:00
Thomas Hellstrom
890ed0e082 Fix a bug where a system memory pixmap got a wrong address if memcpy()
fallback was used for downloading from screen.
2005-11-06 16:40:59 +00:00
Thomas Winischhofer
1f43d218cc EXA: The "optimization" for using a fill operation instead of 1x1 copies
checked the destination drawable's dimensions (!) instead of the
    tile's. Really....
2005-10-20 21:45:40 +00:00
Eric Anholt
744aa34ca5 Add an additional meaning to the "dirty" flag. Now, if !dirty && !area, the
pixmaps's contents are undefined, so we won't need to upload the
    undefined contents in MoveIn. Use the ExaCheck* for async ops as well,
    so that dirty is always tracked. While the performance impact for my ls
    -lR test was not significant (though the avoiding-upload path was being
    hit), it's likely to be important for the upcoming Get/PutImage
    acceleration from ajax.
2005-10-15 02:19:09 +00:00
Benjamin Herrenschmidt
35a767590e Fix stupid mistake in yesterday's allocator commit, would cause exa to
consider a random available memory size
2005-10-13 01:13:58 +00:00
Benjamin Herrenschmidt
e573b272bf Use proper access size when reading pixel based on bpp of the source pixmap 2005-10-12 07:46:36 +00:00
Eric Anholt
55efb41f6c If a window background is a 1x1 pixmap, read the value out and go to
exaFillRegionSolid rather than sending piles and piles of Copies to the
    hardware.
2005-10-12 07:35:20 +00:00
Benjamin Herrenschmidt
12994b9afb Fix a couple of bugs in the offscreen allocator. One mostly harmless was
causing our search loop for evictable blocks to possibly skip a good
    candiate, and another was the allocator would occasionally use
    area->offset as if it was the base of the pixmap, while for a pixmap
    that is not in available state, it is not. This caused some funny
    miscalculation leading to overlapping pixmaps and accesses beyond the
    end of the framebuffer. To make things cleared, I renamed save_offset
    to base_offset, made sure it's the one used everywhere in the
    allocator, and only align "offset" for the client at the end of
    exaOffscreenAlloc().
2005-10-11 23:11:37 +00:00
Benjamin Herrenschmidt
13f958fbe8 Add missing {Prepare,Finish}Access() wrappers for the tile pixmap in the
fallback case
2005-10-10 05:58:41 +00:00
Eric Anholt
046234b3eb Don't try the accelerated glyphs path for component-alpha text (which I
don't expect drivers to be able to accelerate without exa assistance).
    Instead, drop back to plain old miGlyphs for a 62.5% +/- 1.5% reduction
    in runtime of my ls -lR test (n=5) with component alpha. While a
    reasonable approach would seem to be making a better test to see
    whether the entire path would be accelerated and force migration
    appropriately, my attempt at this made the situation much worse.
2005-10-09 02:03:22 +00:00
Benjamin Herrenschmidt
ff258ac278 Clients tend to set picture->repeat when not necessary. Most HW cannot
accelerate repeat NPOT thus triggering software fallback (this is the
    case with gnome desktop for example). This adds a simple optimisation
    to exa that removes "repeat" when it's obviously useless, that is, the
    single picture instance covers the entire rectangle beeing used
2005-10-06 23:45:29 +00:00
Eric Anholt
1614a31a9d Bug #4699: Correct some memory leaks in EXA and damage related to region
handling.
2005-10-06 21:55:41 +00:00
Eric Anholt
f47f00ab74 Mark the temporary pixmap dirty if UploadToScreen succeeds. Failure to do
so resulted in a solid black glyph if the font rendering actually
    resulted in a fallback (subpixel AA, for example) and the temporary got
    migrated after 10 or so glyphs.
2005-10-04 11:24:09 +00:00
Eric Anholt
8814896da8 Fix include path for commit of bug #4616. 2005-10-02 08:53:18 +00:00
Eric Anholt
ecaa46380e Bugzilla #4616:
- Merge various fb/ bits of COMPOSITE support from xserver, which weren't
    necessary before due to cw hiding the issues. Fixes offset calculations
    for a number of operations, and may pull some fixes that cairo has
    wanted for XAA as well.
- Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep
    cw from getting initialized from the damage code. While it would be
    cleaner to have each DDX initialize it if it needs it, we don't have
    control over all of them (e.g. nvidia).
- Use the miDisableCompositeWrapper() to keep cw from getting set up for
    screens using EXA, because EXA is already aware of composite. Avoiding
    cw improved performance 0-35% on operations tested by ajax in x11perf.
2005-10-02 08:28:27 +00:00
Adam Jackson
aa74468aa5 sparse cleanups. s/0/NULL/ and mark a few things static. 2005-09-30 02:03:45 +00:00
Eric Anholt
58abce3f90 - Use the dirty flag (which should be set correctly all the time,
particularly thanks to Prepare/FinishAccess) to avoid DFS/memcpy on
    pixmap move-out if it's unnecessary. This was disabled in KAA because
    cache misuse on ATI made me guess that this code was wrong.
- Unwrap Glyphs on closescreen.
2005-09-28 20:01:37 +00:00
Eric Anholt
56e7766c77 Bug #4541: Fix text drawing in the case where a list contains no
non-zero-sized glyphs. Several variables weren't updated, resulting in
    rendering simply stopping when this case was hit. (Anders Kaseorg)
2005-09-21 22:26:07 +00:00
Eric Anholt
361a9eb953 - Change migration-in rule slightly: previously, if your score was less
than the max, it was bumped, and then if you were above the threshhold
    you got moved in. Instead, do the above-threshhold check separate from
    score starting out less than max. While this will likely make thrashing
    cases worse, I hope it will fix some issues with long term performance
    (think of an xcompmgr with a backbuffer it's doing only accelerated
    operations to. If some new pixmap comes in and bumps it out, even once,
    it will never get a chance to re-migrate because its score will be
    maxed). Change migration-out to be the same way for symmetry, though it
    shouldn't ever affect anything.
- Fix a lot of debugging output, both in terms of printing quality, and
    completeness. The fallback debugging covers a lot more now, pointing
    out new areas for improvement. Debugging toggles are now centralized in
    exaPriv.h.
2005-09-21 10:27:53 +00:00
Eric Anholt
6a29c4cec1 Add support for hardware accelerating tiled background painting. One
example of this is the root weave, which paints slightly slower on SiS
    now in my testing. However, according to keithp some apps use this
    feature for a sort of cheap backing store, which this could help with
    significantly. While I haven't done much performance testing with it,
    it will at least rule out one possible source of terrible performance.
2005-09-21 07:43:01 +00:00
Eric Anholt
a1bcf25a1f Break EXA ABI while we still can. Add coordinates to the UploadToScreen
hook so we can upload a subset of a pixmap, and convert the current
    drivers to respect that. Use this support to directly UploadToScreen in
    exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR
    programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches
    hot). I would have bumped major version, only I can't tell what the
    EXA_VERSION_* is supposed to be doing as opposed to the module version.
2005-09-18 02:32:23 +00:00
Eric Anholt
074913c8a9 - Don't try to upload 0 byte-per-pixel (PICT_a1) data using
RADEONHostDataBlit.
- Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It
    appears that we do need the cache flush here, thought it's not clear
    why. Disable the 2d to 2d shortcut while here, since I'm unsure of what
    we're doing. Exposed by the following bit:
- Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs
    were being accumulated in from non-migratable scratch pixmaps, causing
    the destination pixmap to move towards screen but the migration
    necessary for source never to happen, leading to abysmal performance.
    Instead, copy the scratch glyph data into a real pixmap first, then
    composite from that into the destination, allowing for migration. time
    ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall
    time (n=3).
- Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of
    windows needing backing store. Makes migration code prettier, and
    ensures that composited windows will be migrated as normal when we turn
    off cw for EXA. (issue brought up by keithp)
2005-09-17 20:02:02 +00:00
Daniel Stone
c3d6799cee Bug #594: CAN-2005-2495: Fix exploitable integer overflow in pixmap
creation, where we could create a far smaller pixmap than we thought,
    allowing changes to arbitrary chunks of memory. (Søren Sandmann
    Pedersen)
2005-09-13 01:33:19 +00:00
Eric Anholt
b0f6fe1f38 Add some optional (disabled) fallback debugging code to the async code, for
better tracking of when we're hitting software.
2005-09-11 21:38:41 +00:00
Eric Anholt
1c003ccf5d Add a pair of hooks, PrepareAccess() and FinishAccess(), which get called
around CPU access to the framebuffer. This allows the hardware to set
    up swappers to deal with endianness, or to tell EXA to move the pixmap
    out to framebuffer if insufficient swappers are available (note: must
    not fail on front buffer!).
Submitted by: benh
2005-09-11 19:08:10 +00:00
Adam Jackson
ca210830bd Simplify life for EXA drivers by reducing some {Con,Dis}joint ops. 2005-09-11 18:43:55 +00:00
Eric Anholt
0c74799af4 Remove existing broken maxX/maxY code for composite (results in infinite
loops, doesn't deal with failure, doesn't present the interface to
    drivers that I expected) and instead replace it with a simple fallback
    to software when coordinate limits could be violated. Act similarly in
    other acceleration cases as well.
The solution I want to see (and intend to do soon) is to (when necessary)
    create temporary pictures/pixmaps pointing towards the real ones' bits,
    with the offsets adjusted, then render from/to those using adjusted
    coordinates.
2005-08-30 04:41:04 +00:00
Adam Jackson
0926cf79c0 Add diagnostic messages for exaDriverInit failure cases. 2005-08-26 20:21:57 +00:00
Eric Anholt
0711502f18 Bugzilla #4226: Change the pixmap migration strategy for the CopyNtoN case.
Now, if either source or dest were in framebuffer, try to get both
    there, but prefer system memory for both otherwise. Required making
    exaasync.c go through the try-acceleration path. This significantly
    improves window resizing under composite, because previously the
    pattern of creating a new pixmap and copying default contents from the
    screen caused a fallback every time due to the new destination pixmap
    being in system memory.
2005-08-24 23:48:11 +00:00
Eric Anholt
2261710fe0 Fix a bug where NULL could be dereferenced during the pixmap kick-out
process by referencing the correct offscreen area. Also drive-by the
    comments related to these for clarity.
2005-08-24 23:38:25 +00:00
Eric Anholt
55c5c6953a Bugzilla #4090: Introduce getters for pixmap pitch and offset, to
simplify/clarify it for driver writers who probably don't want to know
    what pPixmap->devPrivate.ptr or pPixmap->devKind mean. Converts the sis
    driver to use them, and bumps the EXA module minor version.
2005-08-24 22:43:27 +00:00
Eric Anholt
8fd250e5e4 Bugzilla #4089: Fix crashes in !EXA_OFFSCREEN_PIXMAPS case by not trying to
do migration when the EXA pixmap private is NULL.
2005-08-24 21:51:28 +00:00
Eric Anholt
ebedc8bbb5 - Fix the exa pixmap offset/pitch alignment to deal with non-POT alignment
requirements. MGA, notably, uses a multiple of 3 in some cases.
- Rename the pixmap offset/pitch alignment fields to more clearly state
    their meaning.
2005-08-14 19:46:55 +00:00
Søren Sandmann Pedersen
5849c69db8 Mon Aug 8 13:39:45 2005 Søren Sandmann <sandmann@redhat.com>
Conditionally include xorg-config.h
2005-08-08 18:02:08 +00:00
Keith Packard
4dfc3357a7 Add autogenerated source files and other various non-CVS material to
.cvsignore files
Use XORG_CFLAGS. Ensure that all exa files are in SOURCES
remove _XOPEN_SOURCE as it's always in xtrans.pc these days and gcc whines
libdamage.la needs libcw.la when COMPOSITE is defined, but that
    libdamage.la must be after libcomposite.la, so add libcw.la to
    DAMAGE_LIB instead of EXTENSION_LIBS. Regularize library link order
    across all X servers
2005-08-08 00:38:41 +00:00
Chris Lee
a16357ebc9 Last bits of changes to make exa build properly in the modular server. 2005-08-06 23:46:38 +00:00
Chris Lee
cc67bd187f EXA support in the modular build. 2005-08-06 23:34:09 +00:00