glamor: Changes to 'master'

Zhigang Gong gongzg at kemper.freedesktop.org
Mon Feb 13 03:03:00 PST 2012


 configure.ac              |   54 +++++++++++++
 src/Makefile.am           |    4 -
 src/glamor.c              |   23 ++---
 src/glamor.h              |   22 +++--
 src/glamor_addtraps.c     |    4 -
 src/glamor_copyarea.c     |   56 +++++++-------
 src/glamor_copyplane.c    |    8 +-
 src/glamor_copywindow.c   |    4 -
 src/glamor_core.c         |   20 ++---
 src/glamor_egl.c          |   79 +++++++++++++++++---
 src/glamor_eglmodule.c    |    4 -
 src/glamor_fbo.c          |   17 +---
 src/glamor_fill.c         |   26 +++---
 src/glamor_fillspans.c    |   23 +++--
 src/glamor_getimage.c     |   18 ++--
 src/glamor_getspans.c     |   20 ++---
 src/glamor_gl_dispatch.c  |    2 
 src/glamor_gl_dispatch.h  |    4 +
 src/glamor_glyphblt.c     |   21 ++---
 src/glamor_glyphs.c       |   10 --
 src/glamor_picture.c      |    4 -
 src/glamor_pixmap.c       |   40 ++++++----
 src/glamor_polyfillrect.c |   22 +++--
 src/glamor_polylines.c    |    7 -
 src/glamor_polyops.c      |   26 ++----
 src/glamor_priv.h         |   10 +-
 src/glamor_putimage.c     |   23 ++++-
 src/glamor_render.c       |  179 ++++++++++++++++++++++++++--------------------
 src/glamor_setspans.c     |   28 +++----
 src/glamor_tile.c         |   38 +++++----
 src/glamor_triangles.c    |    4 -
 src/glamor_utils.h        |   42 ++++++++++
 src/glamor_window.c       |    4 -
 src/glapi.h               |  121 +++++++++++++++++++++++++++++++
 34 files changed, 643 insertions(+), 324 deletions(-)

New commits:
commit 8fb50cc6957278219f1b027dfdc76ce1ee35eb63
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Sun Feb 12 09:18:51 2012 +0800

    glamor_render: Only recalculate texture for repeat case.
    
    Slightly optimize the fragment shader, as if we are not
    repeat case and not exceed the valid texture range, then
    we don't need to recalculate the coords.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 30cc457394597978c7a6e6a198c975edbc1f88e8
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Feb 10 17:40:37 2012 +0800

    glamor_tile/composite: Modify fs to re-calculate texture coords.
    
    Then we don't need to fixup the larger pixmap to the exact
    size, just need to let the shader to re-calculate the correct
    texture coords.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 12e0a5670f23d7cea04eb9cd1895c4eac3ed20c8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Feb 10 12:54:44 2012 +0000

    Fixup glx support
    
    Renaming glamor_priv->dispatch and wrapping the access to
    the dispatch table with a function that also ensured the
    context was bound.
    
     dispatch = glamor_get_dispatch(glamor_priv);
     ...
     glamor_put_dispatch(glamor_priv);
    
    So that we catch all places where we attempt to call into GL withouta
    context. As an optimisation we can then do glamor_get_context();
    glamor_put_context() around the rendering entry points to reduce the
    frequency of having to restore the old context. (Along with allowing
    the context to be recursively acquired and making the old context part of
    the glamor_egl state.)
    
    Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 6350035af6317eac9f33e7ada11488e784428476
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Feb 10 16:04:07 2012 +0800

    GLX: Enable glx support.
    
    If we are using MESA as our GL library, then both xserver's
    GLX and glamor are link to the same library. As xserver's
    GLX has its own _glapi_get/set_context/dispatch etc, and it
    is a simplified version derived from mesa thus is not
    sufficient for mesa/egl's dri loader which is used by glamor.
    
    Then if glx module is loaded before glamoregl module, the
    initialization of mesa/egl/opengl will not be correct, and
    will fail at a very early stage, most likely fail to map
    the element buffer.
    
    Two methodis to fix this problem, first is to modify the xserver's
    glx's glapi.c to fit mesa's requirement. The second is to put
    a glamor.conf as below, to the system's xorg.conf path.
    
    Section "Module"
            Load  "glamoregl"
    EndSection
    
    Then glamor will be loaded firstly, and the mesa's libglapi.so
    will be used. As current xserver's dispatch table is the same
    as mesa's, then the glx's dri loader can work without problem.
    
    We took the second method as it don't need any change to xorg.:)
    Although this is not a graceful implementation as it depends
    on the xserver's dispatch table and the mesa's dispatch table
    is the same and the context set and get is using the same method.
    Anyway it works.
    
    As by default, xserver will enable GLX_USE_TLS. But mesa will not
    enable it, you may need to enable that when build mesa.
    
    Three pre-requirements to make this glamor version work:
    
    0. Make sure xserver has commit 66e603, if not please pull the latest
       master branch.
    1. Rebuild mesa by enable GLX_USE_TLS.
    2. Put the glamor.conf to your system's xorg.conf path and make sure
       it loaded prior to glx module.
    
    Preliminary testing shows indirect glxgears works fine.
    
    If user want to use GLES2 for glamor by using MESA, GLX will not
    work correctly.
    
    If you are not using normal MESA, for example PVR's private GLES
    implementation, then it should be ok to use GLES2 glamor and the
    GLX should work as expected. In this commit, I use gbm to check
    whether we are using MESA or non-mesa. Maybe not the best way.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 95091f6ab552997421e7fd9dd7e19bd8c2e3d082
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Feb 10 15:34:43 2012 +0800

    glamor_pixmap: Should bind unpack buffer to 0 after the uploading.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>



More information about the xorg-commit mailing list