Maarten Maathuis
416870d8c9
exa: remove some excessive whitespace
2008-10-03 23:59:06 +02:00
Dave Airlie
5bf3f0fd4e
exa: make sure pixmap devPrivate.ptr is NULL at create time
2008-09-26 08:59:30 +10:00
Julien Cristau
b4762c0245
exa: disable shared pixmaps
...
They got re-enabled in ee7c684f21
("Reimplement ShmPutImage.")
2008-09-16 17:13:42 +02:00
Dave Airlie
0466b8811c
exa: drop cw.h inclusion
...
this doesn't seem to be needed, at least I can't see any warning without it.
I'd like to build EXA into a driver and cw.h isn't exported
2008-09-01 09:57:25 +10:00
Maarten Maathuis
f4e9a1a98f
damage: choose less ambiguous function names
2008-08-31 17:46:26 +02:00
Maarten Maathuis
1861250cd7
{damage,exa}: sanitise damage
...
- Redo damage naming for more consistency.
- Call post submission functions only where appropriate.
- EXA can now live without it's odd damage workarounds.
2008-08-29 22:15:23 +02:00
Tomas Carnecky
ebea78cdba
Prepare for array-index based devPrivates.
...
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Adam Jackson
ee7c684f21
Reimplement ShmPutImage.
...
There's no reason to not just dispatch this straight into the GC. As a
bonus, if you do so, damage wraps correctly, and thus swcursor works.
The side effect is it's no longer possible to override ShmPutImage with
ShmRegisterFuncs().
Also remove the (broken) damage tracking for same from EXA, since it didn't
work right, and is now superfluous.
2008-08-28 10:12:28 -04:00
Maarten Maathuis
dd1e54d6ee
exa: fix thinko from 988725f32e
...
- the drawable of the pixmap is not the same as the original drawable (possibly a DRAWABLE_WINDOW)
2008-08-26 20:02:55 +02:00
Maarten Maathuis
7c14fdbacf
exa: some minor cleanup
...
- Fix compile warning
- Order exa.h by source file that exports the function.
- Move the function i created earlier to private headers.
2008-08-26 17:56:40 +02:00
Maarten Maathuis
de79edbd9f
exa: report damage manually for exa{Trapezoids,Triangles} when needed
...
- Plus a micro cleanup of unused variables.
2008-08-26 17:56:40 +02:00
Maarten Maathuis
988725f32e
exa: move destination damage for internal calls to a special function
...
- This should improve clarity for someone who isn't familiar with the code.
2008-08-26 17:56:40 +02:00
Maarten Maathuis
ce19347680
exa_glyphs: remove useless offset
2008-08-26 17:56:39 +02:00
Maarten Maathuis
bc4cef1d0a
exa: remove useless cache{X,Y}off from UploadToScreen() arguments.
2008-08-19 23:24:33 +02:00
Michel Dänzer
f227fbf74f
EXA: Inline Prepare/FinishAccessWindow into only caller, ChangeWindowAttributes.
...
Also check the requested mask in addition to the GC state before doing work.
2008-08-19 11:36:12 +02:00
Michel Dänzer
825b3fe11d
EXA: Don't use exaGlyphs if the driver doesn't provide a PrepareComposite hook.
...
It's buggy without Composite acceleration (leading to cropped glyphs) and not
really useful in that case anyway. The bug probably still needs to be found and
fixed for drivers that provide a PrepareComposite hook but can't accelerate
text rendering though.
2008-08-19 11:22:40 +02:00
Maarten Maathuis
421b7e8f12
exa: fix assert logic thinko from 361a9eb953
...
- I guess failing PrepareAccess is rare, since this a 3 year old bug.
2008-08-17 19:57:02 +02:00
Michel Dänzer
4212599c92
EXA: Make sure damage tracking code is inactive if the driver manages pixmaps.
...
It was always supposed to be like that... It was only recently pointed out (in
a rather convoluted way) that it was not in fact the case.
2008-08-08 12:17:58 +02:00
Daniel Stone
e882ee7056
EXA: Remove unnecessary #includes
...
There wasn't actually any font code here, so no problem.
2008-08-05 01:17:32 +03:00
Michel Dänzer
148175fb8b
EXA: Do still return FALSE if the driver PrepareCopy hook failed...
...
Thanks to Stuart Bennett for pointing out the problem on IRC.
2008-07-31 16:54:33 +02:00
Michel Dänzer
64ebeeb526
EXA: Fix exponential growth logic for GXcopy tiled fills.
...
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16908 .
2008-07-31 10:58:52 +02:00
Michel Dänzer
8405c25d9d
EXA: Simplify exaFillRegionTiled() control flow.
...
Also only call REGION_TRANSLATE() when necessary.
2008-07-31 10:55:44 +02:00
Michel Dänzer
a3afa6f2fb
EXA: Optimize GXcopy tiled fills.
2008-07-30 18:30:37 +02:00
Michel Dänzer
37087bc106
EXA: Replace open coded CopyArea logic with GC op call.
2008-07-30 18:27:33 +02:00
Alan Hourihane
528b4e36ad
Set driverPriv immediately on CreatePixmap.
...
If it's NULL anyway, we bail, if not, it lets
ModifyPixmapHeader know about the private.
2008-06-18 22:34:02 +01:00
Michel Dänzer
6b96281100
EXA: Fix exaGetPixmapFirstPixel() crash if the driver has a CreatePixmap hook.
...
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16243
2008-06-06 11:01:03 +02:00
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
d733043982
EXA: Don't suggest exaCopyDirty be inlined.
...
Leave the decision to the compiler toolchain.
2008-05-24 20:01:31 +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
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
Michel Dänzer
8349732a67
EXA: Try to accelerate non-antialiased text via the glyph cache as well.
...
Treat 1 bit glyphs and masks as PICT_a8 in the glyph cache. We're not able to
accelerate them otherwise.
2008-04-28 21:09:35 +02:00
Michel Dänzer
a65d530040
EXA: Accumulate glyphs whenever possible, for full benefits of the glyph cache.
2008-04-28 21:03:12 +02:00
Michel Dänzer
e7eaac59c4
EXA: Glyph cache upload tweaks.
...
Track damage after using UploadToScreen directly.
Don't waste any effort on empty glyphs.
2008-04-28 21:00:55 +02:00
Owen Taylor
cc08c06665
EXA: Use UploadToScreen() for uploads to glyph cache
...
When possible, use UploadToScreen() rather than CompositePicture()
to upload glyphs onto the glyph cache pixmap. This avoids allocating
offscreen memory for each glyph making management of offscreen
areas much more efficient.
2008-04-28 21:00:55 +02:00
Owen Taylor
13fd225630
EXA: Clean up debug messages
2008-04-28 21:00:55 +02:00
Owen Taylor
fcb5949928
EXA: Fix overlapping glyphs in glyph cache
...
Allocate each cache at a different vertical position in the
per-format pixmap. Fix width/height confusion when choosing
the cache for a glyph.
2008-04-28 21:00:54 +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
Owen Taylor
54184110f6
EXA: Use a single large glyph cache pixmap
...
Add back exaGlyphs(); the new version copies the glyph images
onto a single large glyph pixmap and draws from their to the
destination surface. This reduces the management of small
offscreen areas and will allow us to avoid texture unit setup
between each glyph.
2008-04-28 21:00:54 +02:00
Tilman Sauerbeck
3f081b4de5
EXA: Set pixmap->accel_blocked on the screen pixmap, too.
2008-04-21 23:07:39 +02:00
Tilman Sauerbeck
26c1801a27
EXA: Update sys_pitch/fb_pitch in exaModifyPixmapHeader.
...
exaModifyPixmapHeader now also only evaluates arguments that have a
meaningful value.
2008-04-21 23:07:39 +02:00
Michel Dänzer
6c95fae1e9
EXA: Offscreen memory eviction improvements.
...
* Make sure available areas are considered to have no eviction cost. This seems
to help for https://bugs.freedesktop.org/show_bug.cgi?id=15513 but I'm afraid
that may just be coincidence.
* Only calculate eviction cost of each area once for each eviction pass.
Safeguard against potential (though unlikely) division by zero.
* Cosmetic enhancements: Name eviction cost related variables 'cost' instead of
'score' to emphasize that smaller values are better, update Doxygen file
comment to the way eviction works now.
2008-04-21 10:45:11 +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
Tilman Sauerbeck
f133d85778
EXA: Update pixmaps' accel_blocked field in ModifyPixmapHeader.
2008-04-14 12:48:13 +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
Fredrik Höglund
8074676d2d
EXA: Optimize the eviction scanning loop in exaOffscreenAlloc.
...
Reduce the cost of the inner loop, by keeping a set of pointers to the
first and the last areas in the series, subtracting the cost of the first
area from the score, and adding the cost of the last area while walking
the list. This commit also moves the scanning loop from exaOffscreenAlloc
into a separate function.
Idea by Michel Dänzer.
2008-03-31 21:24:59 +02:00
Fredrik Höglund
93d876891d
EXA: Improve the algorithm used for tracking offscreen pixmap use.
...
Replace the current score keeping algorithm with a rolling counter that's
incremented in ExaOffscreenMarkUsed, with the previous value being stored
in the area. exaOffscreenAlloc uses the difference between the counter
value and the value in the area when deciding which area to evict.
It now also takes the size of the areas into account, and favors evicting
smaller areas.
The credit for these ideas goes to Michel Dänzer.
2008-03-31 21:15:50 +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
Bernardo Innocenti
e6ea3147bf
exa: make the prototype for exaGetPixmapFirstPixel() public
...
This fixes a warning in amd_drv which is using it.
Signed-off-by: Bernardo Innocenti <bernie@codewiz.org>
2008-01-14 13:09:13 -05:00
Alan Hourihane
57468a696e
Fix Line drawing with CapNotLast set in PolySegment.
2008-01-04 12:37:55 +00:00
Eamon Walsh
2d17f47cc7
Merge branch 'master' into XACE-SELINUX
...
Conflicts:
hw/xnest/Pixmap.c
include/dix.h
2007-11-19 18:10:46 -05:00
Ben Skeggs
c89b543198
exa: set driverPriv to NULL before it might get used later with garbage
2007-11-17 18:20:49 +10:00
Eamon Walsh
1603130236
Merge branch 'master' into XACE-SELINUX
...
Conflicts:
Xext/xace.c
Xext/xace.h
2007-11-14 13:35:50 -05:00
Michel Dänzer
9bee1c6912
EXA: Disable problematic optimization of dest pixmap migration by default.
...
Also add some code comments about these optimizations.
2007-11-07 19:01:24 +01:00
Eamon Walsh
a52c9b2a59
Merge branch 'master' into XACE-SELINUX
...
Conflicts:
dix/dispatch.c
dix/property.c
hw/xfree86/common/xf86VidMode.c
include/xkbsrv.h
render/glyph.c
xkb/xkbActions.c
2007-11-05 19:08:36 -05: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
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