Commit Graph

209 Commits

Author SHA1 Message Date
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
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
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
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
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