Commit Graph

32 Commits

Author SHA1 Message Date
Chris Wilson 00e8de212b Check the correct Picture for error during creation. 2009-09-22 01:27:25 +01:00
Chris Wilson 57fc09cef2 Avoid fallbacks for a1 src/mask
Carl Worth did the hard work in identifying that the regression in
cairo between X.org 1.6 and 1.7 was caused by cairo sending an a1
mask to the server in 1.7 whereas in 1.6 cairo used local fallbacks
(as the source was using RepeatPad, which triggers cairo's
'buggy_pad_reflect' fallback for X.org 1.6). This was causing the driver
to do a fallback to handle the a1 mask instead, which due to the GPU
pipeline stall is much more expensive than the equivalent fallback in
cairo.

Reference:
  cairo's performance downgrades 4X with server master than server-1.6.
  https://bugs.freedesktop.org/show_bug.cgi?id=23184

The fix is a relatively simple extension of the current
uxa_picture_from_pixman_image() to use CompositePicture() instead of
CopyArea() when we need to convert to a new format.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-20 01:15:41 +01:00
Chris Wilson c2abfa8e54 Avoid fallbacks for compositing gradient patterns
Currently when asked to composite using a gradient source or mask, we
fallback to using fbComposite().  This has the side-effect of causing a
readback on the destination surface, stalling the GPU pipeline.  Instead,
like uxa_trapezoids(), we can use pixman to fill a scratch pixmap and then
copy that to an offscreen pixmap for use with uxa_composite().

Speedups on i915:
firefox-talos-svg:  710378.14 -> 549262.96:  1.29x speedup

No slowdowns.

Thanks to Søeren Sandmann Pedersen for spotting the missing
ValidatePicture().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-09-14 16:26:57 +01:00
Keith Packard 6361c3b9af Fix SHM functions to work with server after 1.6.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25 19:33:25 -07:00
Eric Anholt 22f7cbc32b uxa: Tell the driver when we're just going to immediately map the pixmap.
This lets the driver allocate a nice idle buffer object instead of a
busy one, reducing runtime of firefox-20090601 on my G45 from 50.7 (+/- .41%)
to 48.4 (+/- 1.1%).
2009-07-22 09:16:00 -07:00
Eric Anholt 5ef3db45e0 uxa: Skip fill of temporary alpha picture that just gets copied over.
This was needed when we were doing the mask computations in this pixmap,
but now they're done in a temporary and then uploaded later.

This reduces runtime of firefox-20090601 from 52.6 (+/- .96%) to 50.7
(+/- .41%) seconds on my G45.
2009-07-22 09:15:59 -07:00
Peter Hutterer 0a4c4c5fe8 Update to xextproto 7.1 support.
DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers
need to include dpmsconst.h if xextproto 7.1 is available.

SHM is now shm.h instead of shmstr. Requires definition of ShmFuncs that's
not exported by the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-18 12:10:18 +10:00
Owain Ainsworth 57c7cbade9 accessing a pixmap if prepare_access fails is verboten.
Don't do it, treat this the same as every other prepare access call in uxa.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Owain Ainsworth <zerooa@googlemail.com>
2009-07-17 11:28:29 -07:00
Eric Anholt 1e4784bf26 uxa: Fix segfault on source-only picture usage with FallbackDebug.
Bug #22107.
2009-06-30 19:54:23 -07:00
Carl Worth accdbd2367 UXA: Rasterize trapezoids to system memory, not a pixmap
Since we're only doing software rasterization right now, anyway, it
makes more sense to just rasterize to system memory and then upload
to a pixmap once complete. This avoids expensive read-modify-write
cycles.

This results in a 2.4x speedup for a real-world test case that's
heavy on trapezoids, which is swfdec running on the following file:

http://michalevy.com/wp-content/uploads/Giant%20Steps%202007.swf

Many thanks to Chris Wilson for his cairo-traces repository and
cairo-perf-trace tool which makes it so easy to measure things
like this.
2009-06-09 19:06:12 -07:00
Eric Anholt 47591334a1 Remove pre-server-1.5 support. 2009-04-27 16:50:34 -07:00
Alan Coopersmith b8ca146b06 Fix UXA to build with Sun compilers (use __func__ instead of __FUNCTION__)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-24 16:04:13 -07:00
Keith Packard fe08b81d0f Use CopyArea to load glyphs from per-glyph pixmap to cache pixmap
With glyphs sitting in per-glyph pixmaps, there's no reason to use the CPU
to move them to the cache pixmap, and lots of reasons to use the accelerator.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-03-13 15:03:38 -07:00
Eric Anholt 22dc9a5580 Fix UXA for server 1.4. 2009-02-26 14:20:42 -08:00
Eric Anholt cb1f7ec087 uxa: Fix composite fallback debug printing of main memory versus bo info.
It was just printing whether it was a pixmap (it is), instead of whether the
pixmap was offscreen.
2009-02-26 14:20:42 -08:00
Eric Anholt 3012d85cc5 uxa: Fix breakage from UXA_FALLBACK conversion from "do {} while (0)" construct.
Thanks to keithp for post-commit review.
2009-02-10 18:47:28 -08:00
Eric Anholt 5009127de7 uxa: Fix driver against fbDoCopy -> miDoCopy change in the server. 2009-02-10 18:23:35 -08:00
Eric Anholt b53977f4c5 uxa: Fix failure to --amend in further changes in previous commit. 2009-02-10 18:23:16 -08:00
Eric Anholt 5212ec6515 uxa: hook up the fallback debug to the driver's fallback debug option. 2009-02-10 15:35:20 -08:00
Bernhard Rosenkraenzer c80f1a9c51 UXA: Declare glyph cache picture as component-alpha when necessary.
Without this, rendering component-alpha glyphs may break without a mask.

Bug #19534.  Ported from fix by Michel Dänzer <daenzer@vmware.com> in
xserver commit 639f289dcdbe00a516820f573c01a8339e120ed4
2009-01-13 10:37:41 -08:00
Keith Packard 632f816c72 uxa: handle uxa_prepare_access failure
uxa_prepare_access may fail to map the pixmap into user space. Recover from
this without crashing.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 09:31:39 -08:00
Eric Anholt ecdd706873 uxa: Correctly prepare/finishaccess of stipple in ValidateGC (and only it)
This avoids prepare/finish_access_gc overhead when we're not changing things
(since GCTile is already handled) and get us the RW flag for the prepare on
of the stipple pixmap so thing will be synced correctly.
2008-12-16 10:21:59 -08:00
Eric Anholt 261c20a479 uxa: Add in EnableDisableFBAccess handling like examodule.c did.
This fixes assertion failures when rendering text while VT switched.
2008-12-05 12:13:26 -08:00
Dave Airlie 293f6232c6 uxa: don't call composite routines with no buffer.
We can get a case with gnome-terminal + links, where we get two arrays
of glyphs all with 0 width and 0 heights in them. If this happens
we manage to get to this case without any buffer setup and segfault.

(cherry picked from commit 717c7492a0f6ba3fb3eabda33515881eef314155)
2008-12-03 16:55:31 -08:00
Jesse Barnes f082e877d5 Work around gcc uninitialized variable warnings
GCC isn't smart enough to analyze the control flow and figure out that
these are false positives, but initializing them shouldn't hurt, so work
around it.
2008-09-30 12:06:46 -07:00
Eamon Walsh 808b72f814 Change uxa private keys to integer variables.
Prepares for a devPrivates system that will store an index.
2008-08-26 22:34:05 -04:00
Keith Packard fc3e287e6b [uxa] Remove unused pixmap size limits.
All size-related rendering limits should be managed by the driver in the
pixmap_is_offscreen call. There's no need for uxa to even know these values.
2008-08-05 22:50:01 -07:00
Keith Packard 68f0872db6 [uxa] Check xalloc returns and deal with failure
Failing xalloc in a rendering function means just dropping the drawing on
the floor (that's what we've always done).
2008-08-05 22:36:03 -07:00
Keith Packard b2d058d80c Rename uxa using _ instead of caps 2008-08-05 15:41:52 -07:00
Keith Packard fc4d9c55a7 Change PrepareAccess to take access mode rather than index 2008-08-05 15:41:51 -07:00
Keith Packard 4cc20b7f6e Don't call sync on prepare_access -- just let the driver deal with it.
Let the driver do whatever sync is necessary from the prepare_access hook
rather than forcing a full sync.
2008-08-05 15:29:50 -07:00
Keith Packard 59774e9aca Add UXA - the unified memory acceleration architecture.
This eliminates the cost of EXA migration management while providing full
pixmap allocation control to the driver. The goal is to make something
useful for UMA drivers.
2008-08-05 15:29:50 -07:00