Commit Graph

3973 Commits

Author SHA1 Message Date
Chris Wilson 42e2036cda sna: Use bo for scratch pixmaps allocated by the dix/mi routines
Now that we have the rudiments of accelerated deep-plane copies, we can
begin to benefit from using BO for the core dix/mi routines like
ShmPutImage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-01 21:12:02 +00:00
Chris Wilson 45cc952994 sna: Fix debugging assertions for Composite
When comparing drawable clip extents against pixmap boundaries we need
to include the pixmap screen offset on a Composited desktop.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-01 21:12:02 +00:00
Chris Wilson ebc9f3966d sna: Accelerate deep-plane copy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-01 21:12:02 +00:00
Chris Wilson e0fd07bc25 sna: Accelerate XYPixmap upload when using GXcopy
Mostly for the lols.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-01 21:12:02 +00:00
Chris Wilson 22c43efe6b sna: Implement 8x8 stippled rect fills
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-01 21:12:02 +00:00
Chris Wilson c58b7643e9 sna: Accelerate 1bpp uploads
These still get used (see Wine and Swing) by applications which like to
do "crisp" 1-bit rendering on the client side and then put onto the
scanout. So avoid the readbacks, and push them through the BLT instead. It
turns out to be faster than using fb too, bonus!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-01 21:12:02 +00:00
Chris Wilson 8939ddbc27 sna: Improve rendering of thin segments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 19:15:01 +00:00
Chris Wilson 98b830a975 sna: Improve rendering of thin lines
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42443
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 19:11:31 +00:00
Chris Wilson 6a5834ae56 sna/gen3: Fix invalid assert
SHADER_CONSTANT is expected here, the other IMMEDIATES however should
have already been handled.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 16:27:43 +00:00
Chris Wilson e12375d05b sna: Fix a few minor cut'n'paste errors
Use the constant value [last_box-box] where applicable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 14:25:20 +00:00
Chris Wilson 20a4f53395 sna: Apply the GPU damage for clipped PolyFillRectangles
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42425
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 14:14:40 +00:00
Chris Wilson 7172f28c2b sna: Fix placement of clipped wide PolyRectangle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 12:53:35 +00:00
Chris Wilson 59535d0e1c sna: Set the flush interval based on output vrefresh
Rather than a blank 25Hz, use twice the vblank interval to hopefully
avoid bad values.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 12:31:23 +00:00
Chris Wilson 9a2e59bfba sna: Fix reversal of zero/wide for PolyRectangle
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42414
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 11:56:53 +00:00
Chris Wilson b1287e4934 sna/video: Fix copy region for cropped video
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42412
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 11:27:36 +00:00
Chris Wilson b4ab412cb3 sna/blt: Optimise fill with GXcopy and pixel==0 to a GXclear
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 10:37:43 +00:00
Chris Wilson 088728ad26 sna/blt: Don't idiotically override alu for pixel==0 and track alu
Another classic and utterly stupid mistake. At least I was consistent in
my error.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42414
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 10:05:43 +00:00
Chris Wilson 9c399c74ad sna: Add an option to disable the delayed flush
Section "Device"
  Option "DelayedFlush" "False"
EndSection

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-31 09:22:43 +00:00
Chris Wilson c8860ce26e sna: Report whether anything was retired to the inactive list
So that we can skip a fresh search of the inactive list if nothing
changed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 23:26:33 +00:00
Chris Wilson a7adcc8e47 sna: Stash the last scratch pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 23:10:27 +00:00
Chris Wilson c8d4f5d32a sna: Correct PolyRectangle verticals to be the end-point not the length
Fixes an off-by-one in the drawing of the rectangles caused by a
too-literal translation of the rectangles into boxes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 21:41:08 +00:00
Chris Wilson 5c45622b88 uxa/glyphs: Fallback rather than fail to render with a non-solid Source
Reported-by: Uli Schlachter <psychon@znc.in>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31819
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 17:49:19 +00:00
Chris Wilson e6eb803cb4 sna: Loop over all clip rects for glyph blt rather than fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 17:44:26 +00:00
Chris Wilson 1eefb75c91 sna: Don't mess with NDEBUG
This is set in configure and redefining it later inside the C files just
leads to trouble and broken compilation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 17:17:36 +00:00
Chris Wilson 7237374a03 configure: Bump version to 2.16.901 2011-10-30 16:46:10 +00:00
Chris Wilson 0a78a75e75 NEWS: Add release notes for 2.16.901 2011-10-30 16:45:46 +00:00
Daniel Vetter c7552cb819 i810: kill mmio vga access helpers
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-30 17:46:07 +01:00
Daniel Vetter e8b8adeab3 i810: use vgahw functions instead of roll-your-own
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-30 17:46:06 +01:00
Daniel Vetter 4aeea489ed i810: rip out PIO access functions
All the io done at init time is already converted to libpciaccess

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-30 17:46:06 +01:00
Daniel Vetter e735636194 i810: kill dead i830 defines
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-30 17:46:06 +01:00
Chris Wilson bb840ee09f sna: Convert PolyRectangles to use Box32
For the same overflow protection.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 16:13:04 +00:00
Chris Wilson af52e234a7 sna: Fix compilation
Remember to drink coffee and compile "obvious" fixes before pushing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 15:34:34 +00:00
Chris Wilson 23b314729c sna: Rewrite box32_add_rect() to enable int32_t promotion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 15:24:21 +00:00
Chris Wilson 427622aca3 sna: Push overflow detection to the end of extents
Removes a couple of conditionals from the middle of the hotpath and on
Intel we are not realising the benefit of only utilising 16-bit values.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 12:09:44 +00:00
Chris Wilson 2d3aba8518 Revert "sna: Don't flush the render caches if in the process of writing again"
This reverts commit 15266e1b95.

KDE relies upon the ability to render into a sampler and then render
upon itself. Not the first sign of madness...

Will have to find another way of winning back the compwinwin
performance.
2011-10-30 11:23:23 +00:00
Chris Wilson d406270517 sna/composite: Fix incorrect operator reduction for RenderFillRectangles
As exemplified by KDE (using Kate) on gen3, it would attempt to render a
large set of boxes using OVER and a transparent colour. As gen3 copied
across some of the BLT assumptions, it was incorrectly reducing that to
a CLEAR and thus rendering incorrectly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-30 10:45:26 +00:00
Jeremy Huddleston da3f865674 Use malloc/calloc/realloc/free directly
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-29 20:15:11 -07:00
Chris Wilson 17ba07a7be sna/gen3: Set the src flags for fill
A regression from c2040fb8e6 (sna: Remove
the memset(0) of the fill op) left the flags for the source channel
uninitalised leaving the shader construction undefined and causing
visual glitches.

Reported-by: Paul Neumann <paul104x@yahoo.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42367
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-29 20:10:28 +01:00
Chris Wilson 4835fe5b2e sna/genX: Improve reduction of Render operator to BLT alu
This appeared to introduce a visual gitch into the xfce4 selection box
on gen6 at least.

References: https://bugs.freedesktop.org/show_bug.cgi?id=42367
Reported-by: Paul Neumann <paul104x@yahoo.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-29 18:58:07 +01:00
Chris Wilson 33383fde55 sna: Tweak PolyRectangle blitting
A box of height/width 1 and lineWidth 0 can also be drawn with a single
box as the far edge is contiguous with far side of the near edge.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-29 13:42:54 +01:00
Chris Wilson 64a57c8dbe sna: Further clipping bugs
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>
2011-10-29 11:02:35 +01:00
Chris Wilson 719626ef79 sna: Increment clip box when short-circuiting the iteration
Reported-by: nkalkhof@web.de
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-29 10:34:10 +01:00
Chris Wilson 32a9e0352a sna: Retire and search inactive again before creating new buffer
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>
2011-10-29 10:33:31 +01:00
Chris Wilson 15266e1b95 sna: Don't flush the render caches if in the process of writing again
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-28 18:00:56 +01:00
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