Commit Graph

67 Commits

Author SHA1 Message Date
Michel Dänzer
3b8d53452c EXA: Fall back in CompositeRects if the driver can't accelerate Composite.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=15780 .
2008-05-01 15:10:52 +02:00
Owen Taylor
40eb14c948 EXA: Add exaCompositeRects()
Add a function to composite multiple independent rectangles
from the same source to the same destination in a single
operation: this is useful for building a glyph mask.
2008-04-28 21:00:54 +02:00
Tilman Sauerbeck
bb8868540f EXA: Teach exaCompositeFallbackPictDesc() about x8r8g8b8. 2008-04-14 12:48:13 +02:00
Owen W. Taylor
6b1a27023e EXA: Fix TS origin computation when implementing RenderComposite with tiling. 2008-04-07 11:01:09 +02:00
Maarten Maathuis
f6d51797a5 EXA: Let the driver decide what repeat/extend types are supported. 2008-02-27 23:44:39 +01:00
Eric Anholt
5cb9e15562 EXA: Fix Render acceleration in copy and tiling cases.
Code shuffling in a634c9b034 broke this by
leaving pSrcPixmap = NULL.
2008-02-20 10:36:06 -08:00
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
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
Eric Anholt
439edc768e Merge branch 'glyph-pixmaps'
Conflicts:

	configure.ac
	exa/exa_render.c
2007-10-02 12:14:04 -07: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
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
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
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
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
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
Michel Dänzer
a261e13250 EXA: Remove DrawableDirty.
Convert the remaining callers to PixmapDirty.
2007-04-29 23:49:35 +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
2866e0bac9 Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. 2007-04-29 23:38:13 +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
Eric Anholt
a5f19c5150 Mark sync when UploadToScreen succeeds in exaGlyphs(). 2007-02-14 11:13:21 -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
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
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
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
George Fufutos
afb84c2fca Bug #6911: Check return value of exaGetPixelFromRGBA(). 2006-06-24 15:23:14 +02: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
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
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
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
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
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
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
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
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
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