Commit Graph

3832 Commits

Author SHA1 Message Date
Chris Wilson 01f41e624b sna/gen2: Eliminate redundant diffuse and rectlist emission
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson d9e3dbffcb sna/gen2: Fix fill-one-box
Lets only have one special gen2 value for the source channel pixel
colour and so remove the confusion and misrendering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:24 +01:00
Chris Wilson b89592b16e sna/gen7: Add missing tail to 3DSTATE_SBE
I was a few NULs short of the declared amount.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-16 19:39:14 +01:00
Chris Wilson 33f17b996d Remove a couple of trivial compile warnings for unused variables
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 12:01:34 +01:00
Chris Wilson e5e27528ff sna/blt: Add a pair of operator reductions for opaque fills
Extend the coverage of the BLT for a couple more composite operations,
though they be relatively infrequent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 11:51:44 +01:00
Chris Wilson 3f5289b299 sna/trapezoids: Fallback if the composite operation is not supported
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 11:31:46 +01:00
Chris Wilson 3d79264ef8 sna/tiling: Hook up composite_box
Now used for spans and so triggering death by NULL function pointer on
older chipsets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 11:31:00 +01:00
Chris Wilson f5f3135e3c sna: Ensure that the scanout is flushed before we sleep
So that we do not see any delayed rendering on i965+.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-14 10:40:39 +01:00
Chris Wilson 020d84d2d0 sna/accel: Fix sense of nothing-to-do due to clipping
A missing not due to a hasty conversion from an assert.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 22:32:00 +01:00
Chris Wilson b7fd6906c4 sna/accel: Actually apply the clip to the glyph extents
References: https://bugs.freedesktop.org/show_bug.cgi?id=41718
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:52:14 +01:00
Chris Wilson eb5f86b781 sna/accel: Correctly offset the damage intersection for glyph runs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:52:10 +01:00
Chris Wilson a4766026ad sna/accel: Check for reloc overflow when adding a new glyph run
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:32:30 +01:00
Chris Wilson b10850af41 sna/blt: Check for reloc overflow when initialising solid fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-13 17:09:25 +01:00
Chris Wilson d5242565ef sna/gen2: Trim some surplus state commands
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-12 23:28:57 +01:00
Chris Wilson 7c50205323 Remove vestigial includes from DRI1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-12 20:36:53 +01:00
Chris Wilson b6b3bb9b5e sna: compare against the right array of cache buckets
Fortunately harmless today as there are the same number of
inactive/active buckets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 17:14:18 +01:00
Chris Wilson 1f70095837 sna: And free the clip after creation for PolySegments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 16:06:31 +01:00
Chris Wilson 92f4d978c8 sna: More micro-optimisation of messing around with clip regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 15:52:13 +01:00
Chris Wilson 57151f6547 sna: Micro-optimise checking for singular clip boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 15:23:17 +01:00
Chris Wilson 823a4272c5 sna/gen3: Avoid RENDER/BLT context switch for fill boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:51:41 +01:00
Chris Wilson 887361de17 sna: Enable single fill fast path for PolySegment
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:51:25 +01:00
Chris Wilson 721cf30e9e sna/accel: If the data is already on the GPU, use it for the source
Fixes regression from 1ec6a0e277 (sna: Move the source to the GPU
if it is reused).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:29:28 +01:00
Chris Wilson 15a4410cec sna: use correct insertion point for sorting partials
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 13:28:30 +01:00
Chris Wilson a9b53c4877 sna: Mark the spans render functions as fastcall
This reduces the amount of dancing required to call into the span
functions as we can pass the arguments in both the integer and floating
point registers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 10:56:51 +01:00
Chris Wilson 208fa8e6b8 sna/trapezoid: Perform the NULL check for damage in the caller
Save the function call overhead in the common case.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 10:56:38 +01:00
Chris Wilson 5050fead0e sna/gen3: avoid applying zero offset to common spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 10:54:53 +01:00
Daniel Vetter d0184b5909 snb: implement PIPE_CONTROL workaround
Sandybdrige requires an elaborate dance to flush caches without
hanging the gpu. See public docs Vol2Part1 1.7.4.1 PIPE_CONTROL
or the corrensponding code in mesa/kernel.

This (together with the corresponding patch for the kernel) seems to
fix the hangs in cairo-perf-traces I'm seeing on my snb machine.

v2: Incorporate review from Chris Wilson. For paranoia keep all three
PIPE_CONTROL cmds in the same batchbuffer to avoid upsetting the gpu.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-11 09:54:17 +02:00
Chris Wilson 4a2e833ab1 sna/gen7: Add render support for fill one
To prevent the RENDER to BLT transition and potential stall.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 08:48:54 +01:00
Chris Wilson 41f525fab5 sna/gen6: Add render support for fill-one-box
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 08:48:54 +01:00
Chris Wilson 5b6575bdde sna: Support a fast composite hook for solitary boxes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-11 08:48:54 +01:00
Chris Wilson c5414ec992 sna: Use BLT operations to avoid fallbacks in core glyph rendering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-04 19:30:35 +01:00
Chris Wilson 6b62b9d7c4 sna: Increase reserved space in batch to accommodate gen5 workaround
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-04 19:30:06 +01:00
Chris Wilson 6351d8eb82 sna/gen[23]: Fix compilation with debugging enabled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-04 19:29:46 +01:00
Chris Wilson 1ec6a0e277 sna: Move the source to the GPU if it is reused
We attempt to skip upload a source pixmap to the GPU in the event it is
used only once (for example during image upload by firefox). However, if
we continue to use the CPU source pixmap then it obviously was worth
uploading to the GPU. So if we use the CPU pixmap a second time, do the
upload and then blit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-04 12:23:26 +01:00
Chris Wilson 413c9f7111 sna/blt: Suppress repeated SETUP_BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-03 08:54:50 +01:00
Chris Wilson 1067335305 sna/blt: SETUP_BLT needs 9 dwords of batch space, not 3!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-03 00:09:00 +01:00
Chris Wilson d8c96a6a1d sna/blt: Use SETUP_MONO to reduce the number of fill relocations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-02 23:23:51 +01:00
Chris Wilson 4d227d43f0 sna/accel: Correct syntax for constifying BoxPtr
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-02 12:26:07 +01:00
Chris Wilson 3dd8052416 sna/accel: Only throttle after flushing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-02 11:21:32 +01:00
Chris Wilson 04b8f0a5a1 sna/accel: Add a compile option to force flushing on every blockhandler
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-02 11:21:32 +01:00
Chris Wilson 32cef71efe sna/accel: Add an compile option to disable use of spans
Using spans has a tremendous effect (~100x) on x11perf, some good but
mostly bad. However, in reality operations are mixed and so preventing
migration on alternate opertaions is a win. In the x11perf slowdowns, it
appears to be CPU bound and so it seems like there should be plenty of
scope for recovering the lost performance.

However, for the time being, just go back to the old fallbacks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-02 11:21:32 +01:00
Chris Wilson dc1ec0dd1a sna/accel: Only disable the flush migitration if nothing changed
Previously we ignored updating the scanout in place, and so we were not
amoritizing the shadow cost of common core rendering operations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:09 +01:00
Chris Wilson c6acf13258 sna/accel: Micro-optimise sna_fill_spans_blt
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:09 +01:00
Chris Wilson 8029765515 sna/accel: Don't attempt converting to spans if we will only fallback
As the span code does not yet handle plane masks or stippling, it is
disadvantageous to convert to spans only to fallback.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:09 +01:00
Chris Wilson cd11bd69f4 sna/accel: Use miPolyArc to convert arcs into spans for gpu bo
This is actually tricker than it looks since miPolyArc() sometimes uses
an intermediate bitmap which performs worse than the fbPolyArc() fallback.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:08 +01:00
Chris Wilson d07256cc33 sna/accel: Convert segments into spans similarly to PolyLine
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:08 +01:00
Chris Wilson d09a229e32 sna/accel: Use the mi*Line routines to convert the line into spans for gpu bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:08 +01:00
Chris Wilson e7a662b92e sna: Sort partials by remaining space
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 20:39:08 +01:00
Chris Wilson 13b9b5d8d6 sna/io: Only mark the buffer as LAST if we know we will flush the IO
Otherwise we can continue to batch up the data upload into larger
buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-01 09:23:41 +01:00
Chris Wilson 7ecc6993b8 sna/gen6: Fix offset of Scan-Line-Compare register
Reported-by: Frank Mariak <fmariak@macrosystem.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-30 16:11:05 +01:00