Make sure the line is clipped to the current clip box and discard if the
clip is reduced to nothing.
References: https://bugs.freedesktop.org/show_bug.cgi?id=42361
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Attempt to retire an active buffer into the inactive cache before giving
up and creating a new buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>