summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-11-08sna: Fixes for DBG_NO_HW (i.e. simulated GPU hanges);Chris Wilson
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-08sna/trapezoids: Use ints for the offsets to accommodate multiplicationChris Wilson
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-07sna/glyphs: Bypass masks for single glyphsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07sna/io: Minor tidy of setting command flagsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07sna: Avoid overwriting an upload buffer during readbackChris Wilson
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-07sna/composite: Minor fixes in operator and colour reductionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07sna: Expand multiplies of two 16-bit values to a full 32-bit rangeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07sna: Add some more debugging in the hunt for overflowsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07sna/blt: Small cleanupsChris Wilson
Whilst perusing for overflows, remove some redundant conditionals. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-07sna/gen3: Fix false reduction of ComponentAlpha with white sourceChris Wilson
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-07sna: Fix 16-bit overflow of rowlength for memcpyChris Wilson
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-07sna/glyph: Fallback if we fail to clear the scratch pixmap for the glyph maskChris Wilson
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-06sna: Beware unsigned promotion of int16_t to uint32_tChris Wilson
Mmakes for an unhappy mempy! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-06sna: Self-intersection of wide PolyLine are only drawn onceChris Wilson
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-05sna: Add the pixman version to the debug outputChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05sna: For a 32k max window size, we need to handle up to 128k stridesChris Wilson
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-05sna: Extend the zero-line segments by oneChris Wilson
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-05sna/glyphs: Fix clip detection for small masksChris Wilson
-ENOCOFFEE. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05sna: Constrain GPU pixmaps to always fit within the blitterChris Wilson
Otherwise we end up always doing expensive readbacks where we would obviously prefer it if we simply used cached memory for the CPU operation and then upload. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05sna: Do the supported PictOp check firstChris Wilson
There is no point even attempting a BLT operation if we know that it is an unusual render operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05sna: Render small glyph masks on the CPUChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05sna/gen3: Initiailse the op for fill_boxes()Chris Wilson
After removing the memset(0), a couple of fields where left uninitialised, causing potential rendering glitches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-05sna: s/flush/vblank/ fixes for DBG()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Run the deferred flush at vrefreshChris Wilson
This helps to reduce the perceived jerkiness of the redraw. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42413 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Drain the delayed timer after forcing a flushChris Wilson
The goal is to remove a spurious wakeup when we have no work outstanding afterwards and so would end up prematurely disabling the timer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Convert GXcopy with -1 to GXsetChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Add some asserts to detect buffer overflow.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna/gen5: Prefer using the BLT for many solid fillsChris Wilson
Even if it means incurring a context switch, the BLT unit is significantly faster so long as we do enough fills. And there is the catch ;-) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Add earlier guards against to wedged to sna_glyph_bltChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna/gen5: Also experiment with lazy spans hereChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna/gen6: Enable spans interface for boxesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Silly compile fix, escaped when testing uxaChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Ensure operations on a ShmPixmap are synchronous with clientsChris Wilson
If we are rendering to or from a ShmPixmap, we need to be sure that the operation is complete prior to sending an XSync response to client in order to preserve mixed rendering coherency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna/gen6: Poor man's spans layered on top of the exisiting compositeChris Wilson
Performance of this lazy interface looks inconclusive: Speedups ======== xlib swfdec-giant-steps 1063.56 -> 710.68: 1.50x speedup xlib firefox-asteroids 3612.55 -> 3012.58: 1.20x speedup xlib firefox-canvas-alpha 15837.62 -> 13442.98: 1.18x speedup xlib ocitysmap 1106.35 -> 970.66: 1.14x speedup xlib firefox-canvas 33140.27) -> 30616.08: 1.08x speedup xlib poppler 629.97 -> 585.95: 1.08x speedup xlib firefox-talos-gfx 2754.37 -> 2562.00: 1.08x speedup Slowdowns ========= xlib gvim 1363.16 -> 1439.64: 1.06x slowdown xlib midori-zoomed 758.48 -> 904.37: 1.19x slowdown xlib firefox-fishbowl 22068.29 -> 26547.84: 1.20x slowdown xlib firefox-planet-gnome 2995.96 -> 4231.44: 1.41x slowdown It remains off and a curiosity for the time being. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Make sure the alpha map is accessible by the CPU on fallbacksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Don't reuse partial vmapped boChris Wilson
A fun use after free. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-04sna: Submit the batch on the next blockhander if operation overflowsChris Wilson
If an operation overflows from one batch into another, we submit the complete batch and begin a new. That new batch will not be submitted unless it is filled or on the next delayed flush update. This can cause a flicker as a large operation is broken up, such as performing a CopyArea through a Clipmask. So if we submit a full batch during a flush interval, immediately flush any partial batch at the next blockhandler. This stops rude Santa flashing Rudolf in xsnow! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Compute the correct extents for the PolyRectangleChris Wilson
Otherwise we may leave one behind... A regression from the introduction of sna_poly_rectangles: 40af32a0e9ed971a1f2c2a45266f32016bda7ed3 (sna: Execute blits directly for PolyRectangle) Reported-by: Matti Hamalainen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42568 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03uxa: Remove caching of surface binding locationChris Wilson
If the pixmap were to be used multiple times within a batch with mulitple formats, the cache would only return the initial location with the incorrect format and so cause rendering glitches. For instance, GTK+ uses the same pixmap as an xrgb source and as an argb mask in order to premultiply and composite in a single pass. Rather than introduce an overly complication caching (handle, format) mechanism, kiss and remove the invalid implementation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40926 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Support binding of a bo for multiple formatsChris Wilson
Applications may use the same pixmap with multiple formats within the same operation. For instance, you can premultiply and composite a normal pixmap in this manner. However, as we reused the sampler binding locations of the source (without an alpha channel) for the mask, we failed to read and multiply by the alpha channel causing it to remain black instead of transparent. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40926 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Clean up the fallback code for glyphsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Restore the lowlevel glyph routines for the sake of DamageChris Wilson
Damage bypasses the Text interface, preventing the backend from hooking into the font and storing private glyph representations, and calls directly into the Glyph routines. So to prevent a segfault we have to restore them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Skip encoding zero sized glyphsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Unroll the quadword upload of the glyph dataChris Wilson
We know that the length is nicely aligned and so can avoid a relatively expensive call into memcpy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Add the missing returns to prevent fbImageGlyphBlt fallbacksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Coalesce reduction of cpu damageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Coalesce reduction of gpu damageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Translate glyphs into MSBFirst upon initial loadChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: gc->miTranslate is always 1Chris Wilson
So we can perform some constant folding and eliminate dead code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-03sna: Trimming is redundant given that we always have a CompositeClipChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>