Commit Graph

3527 Commits

Author SHA1 Message Date
Chris Wilson d3c7ee9211 sna: Faster unclipped rectilinear segments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 16:44:16 +01:00
Chris Wilson 3cd909cfe9 sna: Call miZeroArcLine where appropriate for GPU paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 16:15:39 +01:00
Chris Wilson 9921c98df0 sna: Faster unclipped PolyFillRect
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 14:35:42 +01:00
Chris Wilson c1718f96f5 sna: Faster unclipped PolyPoint
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 14:35:42 +01:00
Chris Wilson a4762ed891 sna: Call directly into tiled rects for tiled spans.
As we already know the extents and that this is a candidate for
GPU-acceleration, we can skip over those steps and emit the tiled rects.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 13:39:43 +01:00
Chris Wilson a02069df2d sna: Faster unclipped spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 11:55:27 +01:00
Chris Wilson 48eff1676c sna/gen2: Reset BLT registers across 2D/3D context switches
It appears the hardware trashes the BLT registers after a 3D context
switch, so we need to reload.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 23:56:34 +01:00
Chris Wilson f006fac72a sna: Fast path typically unclipped tiled rects
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 21:50:25 +01:00
Chris Wilson d6f543011b sna: Use private identifier for internal scratch pixmaps
This was meant to be a part of the previous commit.

These are the scratch pixmaps for which we truly do want to allocate
GPU-only.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 20:16:35 +01:00
Chris Wilson 14a065a267 sna: Create scratch pixmap on the CPU
Contrary to earlier belief, the only usage of
CREATE_PIXMAP_USAGE_SCRATCH in the dix/mi are either along paths unused
by us or more importantly for operations which are detrimental to create
GPU-only buffers. So create CPU pixmaps instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 18:06:34 +01:00
Chris Wilson 5d52d50093 sna: Tweak zero line spans to include missing last segment
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 17:07:33 +01:00
Chris Wilson 72e0009635 sna: Fix advance through clip boxes for fill->boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 16:36:59 +01:00
Chris Wilson c7bd89fb54 sna: Fix PolyPoint not to always send 512 boxes
Just emit the remaining boxes!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 16:21:07 +01:00
Chris Wilson cfd5b7f6ce sna: Use fill->boxes to pack PolyFillRectangle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 15:36:00 +01:00
Chris Wilson 8d304f47e3 sna: Use fill->boxes for rectilinear blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 15:00:09 +01:00
Chris Wilson 5d51ff0cf9 sna: Clip PolyLines to the current clip box
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 13:57:59 +01:00
Chris Wilson 990043f6b8 sna: Handle singular clip regions for PolyRectangles
Otherwise X will crash!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 12:42:50 +01:00
Chris Wilson 991582f667 sna/io: Update batch mode after submitting partial requests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:37 +01:00
Chris Wilson 91745de113 sna: Further improve use of fill->boxes for PolyRectangle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:37 +01:00
Chris Wilson ffe1bdea82 sna/blt: After submitting the batch, it will be empty
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:37 +01:00
Chris Wilson b34e745457 sna/blt: Convert Copy with color 0 into a Clear
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:37 +01:00
Chris Wilson 389241aa64 sna: Suppress an overwritten fill
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:36 +01:00
Chris Wilson baf78fcddb sna/gen2: Cache the last solid colour for spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:36 +01:00
Chris Wilson ff4715a369 sna/composite: Discard opaque masks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:36 +01:00
Chris Wilson 0079579ebd sna: Fix debug compilation, again. 2011-10-27 10:25:36 +01:00
Chris Wilson 5988422455 sna: Handle degenerate copy area whilst wedged
We want to return early to avoid handing the empty box as the lower code
makes the assumption that it has work to do.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-27 10:25:33 +01:00
Chris Wilson 3fc7cd2dc8 sna/blt: Rename the composite paths
Whilst re-reading, I found the old naming scheme slightly muddled and
not nearly as descriptive as it should be. Hopefully this slight tweak
reads better in 6 months time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 16:40:28 +01:00
Chris Wilson 280325900b sna/blt: Share the common fill->boxes between blt and render paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 16:40:27 +01:00
Chris Wilson 56f65e6520 sna: Inline box_intersect()
Most of this branchy function is spent in manipulating the stack for the
function call, so inline it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 15:05:09 +01:00
Chris Wilson f65e73f8a3 sna: Use fill->boxes to unroll FillSpans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 15:04:03 +01:00
Chris Wilson 94f9cd40dc sna: Use fill->boxes to unroll PolyPoint
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 15:03:32 +01:00
Chris Wilson 5e08ca75a5 sna: Use the new fill->boxes for PolyRectangle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 15:01:10 +01:00
Chris Wilson efdc7985e2 self-copy-damage 2011-10-26 14:57:28 +01:00
Chris Wilson 0ed3426a81 sna: Convert diagonal zero-width lines into blits
This is slower than falling back to swrast for x11perf (up to 4x slower
on SNB), it is still faster than doing that rasterisation through a
WC-mapping and much faster in ordinary usage due to avoiding the
readback hit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-26 10:37:31 +01:00
Chris Wilson c12371d9e7 sna: Flatten the branching for fill-spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-23 17:59:00 +01:00
Chris Wilson e7f19d85fe sna/blt: Upload the box using a single 64-bit instruction
So long as we have 64-bit instructions of course!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-23 17:59:00 +01:00
Chris Wilson 40af32a0e9 sna: Execute blits directly for PolyRectangle
By constructing the batch buffer directly for PolyRectangle, rather than
via miPolyRectangle->(PolyFillRectangle/PolyLine), we dramatically
reduce the CPU overhead and can saturate the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-23 17:58:55 +01:00
Chris Wilson a18f559961 sna: Fix debug compilation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:43:49 +01:00
Chris Wilson a3a075201c sna: Treat a bo marked as being last seen on the GPU as requiring a flush
We are hitting this path upon retiring the old scanout buffer following
a page-flip. We want to treat this as being hot and available for reuse,
so mark it as such until the next retirement pass.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson 999d13f321 sna: Fast path unclipped points
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson eb80013f4e sna: Fast path for unclipped rectangles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson d6ae86a51c sna: Optimise reduce_damage() to handle all-damaged pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson 5b945b85ee sna: Fast-path unclipped fill spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson e9a193e980 sna: Short-circuit GetWindowPixmap() to speed-up pixmap retrieval
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson 662402e41e sna: Micro-optimise PolyLine blt
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson c2040fb8e6 sna: Remove the memset(0) of the fill op
The backends are all expected to initialise the state required.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 16:11:15 +01:00
Chris Wilson 7e7759db4c sna: Pass a BoxRec to the fill op
For many of the core drawing routines, passing a BoxRec for the fill is
more convenient since they already have one generated by the clip
intersection.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 15:34:28 +01:00
Chris Wilson 98bca2dbb9 sna: Check whether we can blt whilst determining the PolyLine extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 12:01:57 +01:00
Chris Wilson 91f4954975 sna: Speed-up blitting of unclipped lines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 12:01:57 +01:00
Chris Wilson 06d7574d7d sna/damage: Stash the last freed damage for quick reallocation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-21 12:01:57 +01:00