glamor: Changes to 'master'

Zhigang Gong gongzg at kemper.freedesktop.org
Wed Jul 11 00:59:07 PDT 2012


 src/Makefile.am             |    1 
 src/compiler.h              |   59 +
 src/glamor.c                |   26 
 src/glamor_compositerects.c |  278 ++++++++
 src/glamor_copyarea.c       |   13 
 src/glamor_fbo.c            |   24 
 src/glamor_fill.c           |  170 +++--
 src/glamor_glyphs.c         | 1384 +++++++++++++++++++++++++++++++++++---------
 src/glamor_pixmap.c         |    6 
 src/glamor_priv.h           |   98 ++-
 src/glamor_render.c         |  313 ++++++---
 src/glamor_tile.c           |    3 
 src/glamor_trapezoid.c      |    5 
 src/glamor_utils.h          |   66 +-
 14 files changed, 1951 insertions(+), 495 deletions(-)

New commits:
commit 12c5d248a3efe5afb06f0dc246b207cc497e9420
Author: Michel D=C3=A4nzer <michel.daenzer at amd.com>
Date:   Wed Jul 11 15:01:15 2012 +0800

    Fix translation of clip region for composite fallback.
    
    Fixes incorrectly clipped rendering. E.g. the cursor in Evolution
    composer windows became invisible.
    
    Signed-off-by: Michel Daenzer <michel.daenzer at amd.com>
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 1aeca388c9ff9d8cbdfbdd552abe764d36c73f40
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Wed Jul 4 17:59:25 2012 +0800

    glamor_glyphs: Don't merge extents for different lists.
    
    If we merge all lists's extent together, than we may have
    some fail overlap checking. Here is a simple:
    A E
    B F
    C
    D
    
    The first list has vertical "ABCD". And the second list
    has two char "EF". When detecting E, it can successfully
    find it doesn't overlap with previous glyphs. But after
    that, the original code will merge the previous extent with
    E's extent, then the extent will cover "F", so when detecting
    F, it will be treated as overlapped.
    
    We can simply solve this issue by not merge extent from different
    list. We can union different list's extent to a global region.
    And then do the intersect checkint between that region and
    current glyph extent, then we can avoid that fail checking.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 73d33dd2400772ad47a57dad2c2fa93caebccc80
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jul 3 18:24:07 2012 +0800

    glamor_copyarea: Use blitcopy if current state is not render.
    
    Practically, for pure 2D blit, the blit copy is much faster
    than textured copy. For the x11perf copywinwin100, it's about
    3x faster. But if we have heavy rendering/compositing, then use
    textured copy will get much better (>30%)performance for most
    of the cases.
    
    So we simply add a data element to track current state. For
    rendering state we use textured copy, otherwise, we use blit
    copy.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 1ec81c73bf4660d87b9cfa281647ca6cbda68f2e
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jul 3 18:11:12 2012 +0800

    glamor_glyphs: Use cache picture to store mask picture if possible.
    
     By default, mask picture is newly created, and each time we need to
     clear the whole mask picture, and then composite glyphs to the mask
     picture and then composite the mask picture to destination.
    
     Testing results shows that the filling of the mask picture takes a
     big portion of the rendering time. As we don't really need to clear
     the whole region, we just need to clear the real overlapped region.
    
     This commit is to solve this issue. We split a large glyphs list to
     serval lists and each list is non-overlapped or overlapped.
    
     we can reduce the length of overlapped glyphs to do the glyphs_via_mask
     to 2 or 3 glyphs one time for most cases. Thus it give us a case to allocate a
     small portion of the corresponding cache directly as the mask picture.
     Then we can rendering the glyphs to this mask picture, and latter we
     can accumulate the second steps, composite the mask to the dest with
     the other non-overlapped glyphs's rendering process.
     It also make us implement a batch mask cache blocks clearing
     algorithm to avoid too frequently small region clearing.
    
     If there is no any overlapping, this method will not get performance gain.
     If there is some overlapping, then this algorithm can get about 15% performance
     gain.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 4c368b12c1af317c79469f8b6b809997d1769080
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Wed Jun 27 12:53:40 2012 +0800

    glamor_compositerects: Implement optimized version.
    
    Don't call miCompositeRects. Use glamor_composite_clipped_region
    to render those boxes at once.
    Also add a new function glamor_solid_boxes to fill boxes at once.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit ecc70624ca77478a46e9fb9487d76c74c6be1d8f
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jun 26 20:00:21 2012 +0800

    optimize: Use likely and unlikely.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 622bfc174ab0c8a04146bd5fb754e96bc51d38c0
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jun 26 19:56:27 2012 +0800

    create_pixmap: use texture for large glyphs.
    
    As we only cache glyphs smaller than 64x64, we need to use
    texutre for the large glyphs.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 033349420f53cdbbdda37b3975c498a0dc885cf6
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jun 26 17:19:16 2012 +0800

    glamor_copyarea: Fixed a bug introduced by 996194...
    
    Default return value should be FALSE.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f3cff9975b1969b91b85f329be9fa925a9137f34
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jun 26 16:24:32 2012 +0800

    glamor_glyphs: Slightly performance tuning.
    
    As glamor_glyphs never fallback, we don't need to keep the
    underlying glyphs routines, just override the ps->glys
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 593bd206bf2794dc1450e8e7d20142b8d0ca074b
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jun 26 15:39:24 2012 +0800

    glamor_render: Don't allocate buffer for vbo each time.
    
    We can reuse the last one if the last one is big enough
    to contain current vertext data. In the meantime, Use
    MapBufferRange instead of MapBuffer.
    
    Testing shows, this patch brings some benefit for
    aa10text/rgb10text. Not too much, but indeed faster.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit e44ce79d719ece8997c777329834c5293fc668b8
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Tue Jun 26 13:09:05 2012 +0800

    glamor_largepixmap: Walkaround for large texture's upload.
    
    I met a problem with large texture (larger than 7000x7000)'s
    uploading on SNB platform. The map_gtt get back a mapped VA
    without error, but write to that virtual address triggers
    BUS error. This work around is to avoid that direct uploading.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit fc3674fbf40cbe5ddb3e3a29ce86be7db743892b
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Mon Jun 25 23:24:37 2012 +0800

    glamor_render: Optimize the two pass ca rendering.
    
    For the componentAlpha with PictOpOver, we use two pass
    rendering to implement it. Previous implementation call
    two times the glamor_composite_... independently which is
    very inefficient. Now we change the control flow, and do
    the two pass internally and avoid duplicate works.
    
    For the x11perf -rgb10text, this optimization can get about
    30% improvement.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 63fb516af37d07f11b4e8d52338354de98885425
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Mon Jun 25 16:37:22 2012 +0800

    glamor_composite_glyph: Optimize glyphs with non-solid pattern.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 07177a4842851a5ee611bdff6693bdd81c9828c1
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Thu Jun 21 19:30:51 2012 +0800

    glamor_glyphs: Detect fake or real glyphs overlap.
    
    To split a glyph's extent region to three sub-boxes
    as below.
    
    left box   2 x h
    center box (w-4) x h
    right box  2 x h
    
    Take a simple glyph A as an example:
         *
      __* *__
       *****
      *     *
      ~~   ~~
    
    The left box and right boxes are both 2 x 2. The center box
    is 2 x 4.
    
    The left box has two bitmaps 0001'b and 0010'b to indicate
    the real inked area.
    The right box also has two bitmaps 0010'b and 0001'b.
    
    And then we can check the inked area in left and right boxes with
    previous glyph. If the direction is from left to right, then we
    need to check the previous right bitmap with current left bitmap.
    
    And if we found the center box has overlapped or we overlap with
    not only the previous glyph, we will treat it as real overlapped
    and will render the glyphs via mask.
    
    If we only intersect with previous glyph on the left/right edge.
    Then we further compute the real overlapped bits. We set a loose
    check criteria here, if it has less than two pixel overlapping, we
    treat it as non-overlapping.
    
    With this patch, The aa10text boost fom 1660000 to 320000.
    Almost double the performance! And the cairo test result is the
    same as without this patch.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>



More information about the xorg-commit mailing list