summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-26Submit any existing batchbuffer before potentially handing off a BO to TFP.compositing-fixEric Anholt1-0/+17
Otherwise, a GL compositing manager could get the results of rendering not synced with the X command stream as of the TFP call.
2010-05-26uxa: Perform manual damage for CompositeRectsChris Wilson1-0/+5
[xserver-1.8] The damage layer doesn't wrap CompositeRects, so we need to manually append the damaged region ourselves. This works for miCompsiteRects since that translates the call into multiple invocations of either PolyFillRectangle or Composite, which themselves cause damage. Fixes: Bug 28120 - Tint2's tooltip borders end up at 0,0 and do not disappear https://bugs.freedesktop.org/show_bug.cgi?id=28120 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-26uxa: Force the alpha value to 0xffff when treating Over as SrcChris Wilson1-1/+3
Since we have at most 8 bits of alpha, we treat >= 0xff00 as opaque. However, being paranoid we should set the alpha value to 0xfff in case something unexpected happens when converting from the xRenderColor to the pixel value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-26uxa: Use Composite rather than solid blitter for PolyRectChris Wilson1-22/+105
Due to the relocation overhead, using a single composite with many rectangles outperforms many solid blits. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-26uxa: Add PICT format mapping for depth 4 pixmaps.Chris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-26i830: Skip an empty fill.Chris Wilson1-0/+3
In the extremely unlikely event that the higher layer erroneous gave us an empty fill, skip it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-25uxa: Apply the drawable offset to the solid rectsChris Wilson1-6/+9
Fixes: Bug 28120 - Tint2's tooltip borders end up at 0,0 and do not disappear https://bugs.freedesktop.org/show_bug.cgi?id=28120 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24Merge branch 'glyphs'Chris Wilson19-830/+1708
Tweak glyphs to improve x11perf on i915 by about 33%. PineView, aa10text: 460 -> 617 kglyphs/s. PineView, rgb10text: 434 -> 610 kglyphs/s. Speedups ======== xcb poppler 18.636 -> 13.958: 1.34x speedup xlib firefox-talos-gfx 71.905 -> 56.232: 1.28x speedup xcb firefox-talos-gfx 72.882 -> 57.969: 1.26x speedup xlib gnome-terminal-vim 38.126 -> 34.472: 1.11x speedup xcb gnome-terminal-vim 35.164 -> 32.573: 1.08x speedup xlib poppler 19.634 -> 18.246: 1.08x speedup Note the lack of significant improvement for firefox-planet-gnome.
2010-05-24i915: Emit CA over using OutReverse + Add passesChris Wilson4-132/+183
On PineView: 578/621 -> 610/617 kglyphs/sec [rgb/aa]
2010-05-24uxa: Use temporary dest when target is too large for compositorChris Wilson9-123/+431
If the destination cannot fit into the 3D pipeline when we need to composite, we fallback to doing the operation on the CPU. This is very slow, and quite easy to trigger on i915 by plugging in an external display. An alternative is to extract the extents of the operation from the destination using the blitter which can usually handle much larger operations. This gives us a temporary target that can fit into the 3D pipeline and thus be accelerated, before copying back into the larger real destination. For x11perf this boosts glyph rendering on PineView, from 38kglyphs/s to 480kglyphs/s. Just a little shy of the native performance of 601kglyphs/s Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24uxa: Composite glyphs directly onto dst when possible.Chris Wilson3-158/+324
Without using a mask and compositing directly onto the destination, takes us from 580 kglyphs/s to 850 kglyphs/s on i945 [x11perf -aa10text]. However, the extra intersection check almost entirely cancels out the speed up and we discover that the glyphs in x11perf are always overlapping. Nothing is ever easy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: compute normalized texcoords using a scale factor.Chris Wilson1-44/+44
500 -> 580kglyphs/s on i945. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24uxa: translate the region in line for compositesChris Wilson1-19/+14
When compositing, we need to convert the box into a rect and so the advantages of using REGION_TRANSLATE are lost. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: Add special case primitive emitters for glyphs.Chris Wilson1-5/+83
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: Move vertices into a vertex buffer object.Chris Wilson7-225/+298
In theory this should allow us to pack far more operations into a single batch buffer, and reduce our overheads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24Use pwrite to upload the batch bufferChris Wilson5-42/+25
By using pwrite() instead of dri_bo_map() we can write to the batch buffer through the GTT and not be forced to map it back into the CPU domain and out again, eliminating a double clflush. Measing x11perf text performance on PineView: Before: 16000000 trep @ 0.0020 msec (511000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0021 msec (480000.0/sec): Char in 80-char rgb line (Charter 10) After: 16000000 trep @ 0.0019 msec (532000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0020 msec (496000.0/sec): Char in 80-char rgb line (Charter 10) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24Kill paranoid assertions on every write into the batchbuffer.Chris Wilson9-148/+23
On my PineView box these represent ~5% overhead on x11perf text: Before: 16000000 trep @ 0.0020 msec (495000.0/sec): Char in 80-char aa line (Charter 10) 12000000 trep @ 0.0022 msec (461000.0/sec): Char in 80-char rgb line (Charter 10) After: 16000000 trep @ 0.0020 msec (511000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0021 msec (480000.0/sec): Char in 80-char rgb line (Charter 10) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: Emit composite primitive with specialised functions.Chris Wilson2-206/+358
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-23i915: amalgamate composite into a single primitive listChris Wilson5-6/+43
Combine all the calls to composite between prepare_composite and done_composite into a single primitive list, rather than a primitive call per composite(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-23uxa: Spans! OMG!Chris Wilson3-27/+187
Use composite rather than solid blits in order to bring performance on a par with the CPU when using GEM and relocations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-18dri: Clean up DRI2 API #ifdefs a bitKristian Høgsberg1-50/+31
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-05-17i830: Remove vestigal debugging ALWAYS_FLUSH and ALWAYS_SYNCChris Wilson4-24/+0
These are now debugging options exposed in Xorg.conf, and now unused int the source code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-17dri: Check error code from GetScratchGC()Chris Wilson1-2/+5
It may fail so be prepared, and do use the right drawable! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-16uxa: Replace solid planemask [0xffffffff] with FB_ALLONESChris Wilson1-4/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-16i830: Encode surface bpp into formatChris Wilson1-61/+53
References: Bug 28135 - [855GM] Slowdown/High CPU-Usage after Git-Commit 926fbc7d90ac1d0d49d154f136f9c9ed613c98c2 https://bugs.freedesktop.org/show_bug.cgi?id=28135 The simple answer is that I had assumed that 0 was a reserved value. However, without the bbp encoded into the format 0 was used for a8r8g8b8 and r5g6b5, which are very common formats! The other possibility for the slowdown is that gtkperf is using of the now verboten xrgb formats -- but would in fact be valid if the source covers the clip and we could fixup the alpha value in the fixed function combine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-16uxa: Tidy uxa_solid_rects()Chris Wilson1-5/+5
Move the operator reduction after a few fallbacks, closer to its use. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-16uxa: Patterns are acquired at 0,0Chris Wilson1-4/+4
Set the correct offset for the gradients patterns after rendering to a local Picture. Fixes cairo/test/huge-radial and friends Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Force an alpha channel when rendering source fallbacksChris Wilson1-0/+6
As the source may not cover the extents, we need to represent those areas as transparent in the fallback picture, ergo we need an alpha channel. We could be smarter and force a format conversion when necessary, and we could let the backend choose the most appropriate format. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Apply clip for solid rectangles.Chris Wilson1-41/+118
References: Bug 28120 - Tint2's tooltip borders end up at 0,0 and do not disappear https://bugs.freedesktop.org/show_bug.cgi?id=28120 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Avoid using blits when with PictFilterConvolutionChris Wilson1-2/+6
References: Bug 28098 Compiz renders shadows wrong, garbage line of pixels along left and top edge of windows https://bugs.freedesktop.org/show_bug.cgi?id=28098 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Check the w-scaling component is 1 for an translation matrixChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15i830: Remove xrgb conversion to argb, no longer required.Chris Wilson1-31/+2
All textures are now properly declared so that the alpha swizzling occurs in the sampler or not at all. The downside is that for quite a few composite operations we have to fallback to software on older hardware. There is scope for more performing the alpha expansion in shaders or combiners when we know the picture covers the clip - which is almost all of the time for normal operations especially those constructed by Cairo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15i830: Remove incorrectly mapped tex formats.Chris Wilson1-23/+25
We no longer workaround the lack of alpha expansion for xrgb textures as this interferes with EXTEND_NONE, though we could if we know the source covers the clip... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Fix order of conditionals to only run fill_region for SRC or opaqueChris Wilson1-64/+64
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Expand the range of compatible formats to cover all bpp.Chris Wilson1-7/+9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Only use 1x1R as a solid with an opaque format or SRCChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15uxa: Call check_solid before running the solid blitter.Chris Wilson1-4/+8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-15i915: Load texture into directly into OC when possible.Chris Wilson1-1/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14uxa: Disable compatible src xrgb and dst argbChris Wilson1-1/+3
I'm seeing garbage alpha for rendercheck blend: x8r8g8b8a 10x10 SRC ar8g8b8a so disable blitting until I work out if we can fast-path it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14i915: Remove a couple of unsupported 16bpp no-alpha tex formatsChris Wilson1-2/+0
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14uxa: Parse BGRA pixel formats.Chris Wilson1-8/+45
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14Split the prepare blitter functions into check + prepare.Chris Wilson4-41/+95
Allow us to check whether we can handle the operation using the blitter prior to doing any work. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14i915: Don't force alpha=1 for RGB drawables in the shader.Chris Wilson1-73/+50
I was blindly fixing rendercheck without thinking. We need to force the alpha value to be in the blend unit and not before -- otherwise we generate the incorrect result whilst blending. D'oh.
2010-05-14uxa: enable solid rects for backends that require pixmapsChris Wilson1-12/+19
Convert the color into a (cached) pixmap if the backend cannot handle the SolidFill natively. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: Remove pin(); unpin() syncChris Wilson1-3/+0
GEM handles serialisation of the new front buffer with respect to page flipping and rendering and reports back when the flip is complete. Adding a sync point here is then redundant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: Remove unused old_front parameter from drmmode_do_pageflip.Chris Wilson3-10/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: don't overwrite the old intel->front_bufferChris Wilson2-4/+4
It's now handled in the common ExchangeBuffers() path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14i830: Teardown batch entries on reset.Chris Wilson1-0/+34
By not cleaning up the batch entries when resetting the X server, we left the pointers in an inconsistent state and caused X to crash.
2010-05-14dri: Hold reference to buffers across swapChris Wilson1-5/+27
As we schedule swaps for some time in the future and may process a detachment prior to receiving the vblank notification from the kernel, we need to hold a reference to the buffers for our swap event handler. Fixes: Bug 28080 - "glresize" causes X server segfault with indirect rendering. https://bugs.freedesktop.org/show_bug.cgi?id=28080 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-13uxa: Convert 1x1R back to solid_fillChris Wilson1-76/+75
In the change to prevent blitting between incompatible sources, we also prevented 1x1R pixmaps from being used for solid fills. Reorder the sequence of conditions to enable this fast path again.