Chris Wilson
991ffcb60a
sna: Reset the source counter if we completely dirty the CPU pixmap
...
For a long lived pixmap which we are repeatedly using for upload and
copying to other pixmaps, we don't want to keep to maintain a GPU
buffer. So instead, reset the source counter if we discard the GPU bo
and treat the pixmap as purely CPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-11 23:22:35 +00:00
Chris Wilson
403a4dd353
sna: Defer source migration for a solitary upload via CopyArea
...
Try to avoid allocating a GPU pixmap for PutImage followed by CopyArea.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-11 23:19:33 +00:00
Chris Wilson
11acfaa623
sna/glyph: Tweak the small mask threshold
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-11 23:19:32 +00:00
Chris Wilson
c6e6ae1829
sna/glyphs: Cache the glyph pixman_image_t wrapper
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-11 14:37:07 +00:00
Chris Wilson
8f50950f46
sna/gen7: Remove stray no-op from GEN7_3DSTATE_SBE
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-11 00:16:14 +00:00
Chris Wilson
6a8338fc08
sna: Begin debugging gen7
...
This is the stub of the decoder, sufficient to give details of the ops
within the batch and to keep the debugger happy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-11 00:15:44 +00:00
Chris Wilson
2309f19638
sna/dri: Apply the damage for fullscreen async blits
...
Otherwise gnome-shell forgets to update. Eventually, I'll get the async
pageflipping bits merged into the Xserver and this path and its extra
bw wastage will be history! But still I'll be undermined by the
compositor, grrr.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-10 21:01:00 +00:00
Chris Wilson
e65c2c54f5
sna: Store the sna pointer on the pixmap for cheap lookups
...
A large part of the function preamble overhead is the multi-indirection
lookup for retrieving the sna pointer. We can eliminate most of these by
storing a pointer on the Pixmap as well, which we often need to lookup
anyway.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-10 21:01:00 +00:00
Chris Wilson
bddac63de2
sna: Defer purging a target buffer
...
This is to keep the sanity checks upon the caches happy by keeping a
potential flush out of the inactive cache.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-10 21:01:00 +00:00
Chris Wilson
9083f7edcb
sna/gen3: Fixup some false asserts
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-10 21:01:00 +00:00
Chris Wilson
ea01f76819
configure: Force full-debug builds to disable compiler optimisations
2011-11-10 21:01:00 +00:00
Chris Wilson
a72563464f
sna/gen3: Clear the video shader flag upon batch reset
...
Fixes regression from 3252b46e1 .
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-10 00:57:42 +00:00
Chris Wilson
3252b46e11
sna/gen3: Pack video frames
...
If you're going to benchmark, you may as well do so favourably.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 15:27:34 +00:00
Chris Wilson
8e92675952
sna/video: Pass texture video limits to the client
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 14:44:54 +00:00
Chris Wilson
bca58ff6f0
sna: Clear kgem->busy when all requests have been processed
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 14:18:57 +00:00
Chris Wilson
8fdbd01c94
sna/video: Use the normal bo cache for texture video streams
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 14:00:16 +00:00
Chris Wilson
436a786845
sna: Track purgeability separately from reusability
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 12:54:33 +00:00
Chris Wilson
2699c01a39
sna: Handle non-reusable bo more correctly during retire
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 12:27:52 +00:00
Chris Wilson
fcc89d2660
sna: Safety first; make all flinked bo unreusable
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 12:25:43 +00:00
Chris Wilson
f62b9f94f6
sna/video: Pass cropped source dimensions along with frame data
...
So pack all the relevant details into the same structure.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 10:26:49 +00:00
Chris Wilson
5809b1ad93
sna/video: Tidy up copy routines
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-09 09:41:53 +00:00
Chris Wilson
1cd0610018
sna: Protect against NULL deference of damage after reduction
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:05 +00:00
Chris Wilson
4b100b099a
sna: Convert stippled spans to rects
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:05 +00:00
Chris Wilson
7b95f87b26
sna: Use the blitter for overlapping lines if the alu doesn't read dst
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:04 +00:00
Chris Wilson
9a8d3a9dff
sna: Avoid the penalty of only writing partial channels with glyphs
...
Yes, writing 3 channels is slower than writing 4. But it's okay we
simply ignore the alpha value anyway.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:04 +00:00
Chris Wilson
576c5169ef
sna: Tidy sna_copy_bitmap_blt
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:04 +00:00
Chris Wilson
32bbeefb85
sna: Pack clipped stippled uploads
...
This are even more likely to fit inside the immediate payload.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:04 +00:00
Chris Wilson
3620cd2d15
sna: Begin hooking up valgrind/memcheck
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 18:12:04 +00:00
Chris Wilson
aeaadb1609
sna: Handle creation of large Screen pixmap when the GPU is wedged
...
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=42606
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 11:03:19 +00:00
Chris Wilson
7577d6ea45
sna: Add some error messages to explain why we failed to create the screen
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 10:24:34 +00:00
Chris Wilson
33256af40b
sna: Fixes for DBG_NO_HW (i.e. simulated GPU hanges);
...
A couple of the recent GPU paths were failing to check for !wedged.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 09:55:07 +00:00
Chris Wilson
5f0886dae2
sna/trapezoids: Use ints for the offsets to accommodate multiplication
...
Although the original precison need only 16-bits to store the offsets,
after projecting on to the sample grid we need a few more bits of
precision and so need a larger integer type to avoid overflow and render
glitches.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42680
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-08 08:43:23 +00:00
Chris Wilson
33351d5c3d
sna/glyphs: Bypass masks for single glyphs
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 22:57:44 +00:00
Chris Wilson
e4872225ac
sna/io: Minor tidy of setting command flags
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 22:57:05 +00:00
Chris Wilson
5ba8ba7421
sna: Avoid overwriting an upload buffer during readback
...
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42677
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 22:56:46 +00:00
Chris Wilson
8f7a8a8023
sna/composite: Minor fixes in operator and colour reduction
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 20:10:28 +00:00
Chris Wilson
b1234f3d3a
sna: Expand multiplies of two 16-bit values to a full 32-bit range
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 20:10:27 +00:00
Chris Wilson
afdf931e61
sna: Add some more debugging in the hunt for overflows
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 20:10:27 +00:00
Chris Wilson
8f3c845782
sna/blt: Small cleanups
...
Whilst perusing for overflows, remove some redundant conditionals.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 20:10:26 +00:00
Chris Wilson
8e775ceccc
sna/gen3: Fix false reduction of ComponentAlpha with white source
...
The principle behind the opertator reduction of WHITE * maskca is valid,
except that we failed to account for the src/mask transposition when
emitting the vertices - garbage ensued.
Given that we agressively reduce the shader required for WHITE * maskca,
it does not seem worthwhile to special case the primitive emitter as
well.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42676
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 20:09:31 +00:00
Chris Wilson
65a440543b
sna: Fix 16-bit overflow of rowlength for memcpy
...
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42619
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 20:00:20 +00:00
Chris Wilson
d4edbd4804
sna/glyph: Fallback if we fail to clear the scratch pixmap for the glyph mask
...
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42663
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 11:25:50 +00:00
Chris Wilson
05f3e96a69
test: Compile fix for make check
...
Reported-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07 09:28:44 +00:00
Chris Wilson
cd3d860377
sna: Beware unsigned promotion of int16_t to uint32_t
...
Mmakes for an unhappy mempy!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-06 11:14:28 +00:00
Chris Wilson
0b9408d972
sna: Self-intersection of wide PolyLine are only drawn once
...
We need to process the union of the PolyLine command if lineWidth!=0 so
we cannot generally feed lineWidth==1 into our special case handler.
Proving the lines do not intersect is as difficult as finding the
intersections and thereby finding the union of the path - so there is no
advantage in adding a check whether a wide line could be special cased.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-06 09:56:52 +00:00
Chris Wilson
c76714c29d
test: Add a basic line tester
...
Starting with exercising drawing of a single segment.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-06 09:43:47 +00:00
Chris Wilson
c1e1e20fe7
sna: Add the pixman version to the debug output
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05 22:34:27 +00:00
Chris Wilson
e2165f0e6b
sna: For a 32k max window size, we need to handle up to 128k strides
...
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42619
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05 19:43:34 +00:00
Chris Wilson
c5d94b21d5
sna: Extend the zero-line segments by one
...
Fixes misrendering of the wine tabs
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42606
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05 14:33:43 +00:00
Chris Wilson
0cf29afda9
sna/glyphs: Fix clip detection for small masks
...
-ENOCOFFEE.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05 12:36:53 +00:00