glamor: Changes to 'master'

Zhigang Gong gongzg at kemper.freedesktop.org
Sun Jan 29 01:08:44 PST 2012


 configure.ac             |    5 
 src/Makefile.am          |    1 
 src/glamor.c             |  223 ++++++++++++------------
 src/glamor.h             |   59 ++++--
 src/glamor_copyarea.c    |   18 +
 src/glamor_core.c        |   43 ++--
 src/glamor_debug.h       |    3 
 src/glamor_egl.c         |   97 +++++-----
 src/glamor_fbo.c         |  432 +++++++++++++++++++++++++++++++++++++++++++++++
 src/glamor_fill.c        |   26 +-
 src/glamor_getimage.c    |    3 
 src/glamor_getspans.c    |    4 
 src/glamor_gl_dispatch.c |   28 +--
 src/glamor_gl_dispatch.h |    1 
 src/glamor_picture.c     |   22 +-
 src/glamor_pixmap.c      |  259 ++++++++++++++++------------
 src/glamor_priv.h        |   83 +++++++--
 src/glamor_putimage.c    |    5 
 src/glamor_render.c      |  200 ++++++++++++++++-----
 src/glamor_tile.c        |   39 +++-
 src/glamor_utils.h       |   32 ++-
 21 files changed, 1176 insertions(+), 407 deletions(-)

New commits:
commit bab6e844e91e320ecde51aed555295efcfd467f6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jan 27 13:22:13 2012 +0000

    Use CLAMP_TO_BORDER in copy_n_to_n so we can sample outside of the source
    
    In order to reduce a composite operation to a source, we need to provide
    Render semantics for the pixel values of samples outside of the source
    pixmap, i.e. they need to be rgba(0, 0, 0, 0). This is provided by using
    the CLAMP_TO_BORDER repeat mode, but only if the texture has an alpha
    channel.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
    Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit fe4b69859b7c94e8061f668253006412fff234a7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jan 27 13:22:12 2012 +0000

    Do not reduce a composite to a copy if we need to sample outside of the source
    
    In order to maintain Render semantics, samples outside of the source
    should return CLEAR. The copy routines instead are based on the core
    protocol and expects the source rectangle to be wholly contained within
    the drawable and so does no fixup.
    
    Fixes the rendering of GTK icons.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
    Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit a40fc0ca00ddc81396b668d2ab3178c1cb810ec0
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Sun Jan 29 14:14:36 2012 +0800

    glamor-gles2: Fixup the pixmap before read back if it is not readable.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 6341657a03c96a3ce7cecac387259bf304d1b2f4
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Sat Jan 21 14:41:44 2012 +0800

    glamor-fbo: Tweek the cache bucket calculation.
    
    And also reduce the expire count to 100 which should be
    good enough on x11perf and cairo-trace testing.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 2f4a71f7c87ffc1466131a6e0bc44e9e85e2ebcd
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Sat Jan 21 13:22:14 2012 +0800

    glamor_create_fbo: Concentrate the fbo size/depth checking.
    
    Concentrate checking the size/depth when creating fbo. Simply
    the pixmap creation and the uploading fbo/texture preparing.
    
    Also slightly change the uploading fbo's preparation. If don't
    need fbo, then a fbo only has valid texture should be enough
    to return.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f646b45987370c86dcc1a4fbf085831e6fb607ef
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 20:38:29 2012 +0800

    glamor-pixmap-upload: Create a uploading fbo with a texture only.
    
    Just an initial implementation and disabled by default.
    When uploading a pixmap to a texture, we don't really want
    to attach the texture to any fbo. So add one fbo type
    which doesn't has a gl FBO attached to it.
    This commit can increase the cairo-trace's performance by
    10-20%. Now the firefox-planet-gnome is 8.3s. SNA is still
    the best, only take 3.5s.
    
    Thanks for Chris to point out the A1 pixmap uploading bug.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 3e69da0af314d4bd3cea356a988f2984b940be28
Author: Li Peng <peng.li at intel.com>
Date:   Fri Jan 20 16:23:17 2012 +0800

    glamor: check driver support GEM or not
    
    glamor calls DRM_IOCTL_GEM_FLINK to get a name for a buffer object.
    It only works for driver that support GEM, such as intel i915 driver.
    But for pvr driver who doesn't has GEM, we can't do it this way.
    
    According to Chris's comments, we check the has_gem as the following
    method:
    
    Here we just try to flink handle 0. If that fails with ENODEV or
    ENOTTY instead of ENOENT (or EINVAL on older kernels), set has_gem=0.
    
    Signed-off-by: Li Peng <peng.li at intel.com>
    Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f6691ba19552d6137602058b8663e115cf3e602b
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 15:56:25 2012 +0800

    glamor_gles2: Consolidate gles2 pixmap format readable check to one function.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f9b4bd8ab5643bbf82eb896c0ded381fb3b0c423
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 12:10:06 2012 +0800

    glamor_egl: Add support for the platform doesn't have gbm.
    
    Maybe we should use eglGetDisplayDRM to get display, but current
    PVR's driver is using eglGetDisplay.
    
    Signed-off-by: Peng Li <peng.li at intel.com>
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f9bcc8909dae77e3936b98afba79a3618c629e1c
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 11:58:34 2012 +0800

    glamor_egl: Don't call eglDestroyImageKHR directly.
    
    Some implementation doesn't have it.
    
    Signed-off-by: Peng Li <peng.li at intel.com>
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f0586bdc5c6484b29c69a14181d306ccb81e1bed
Author: Peng Li <peng.li at intel.com>
Date:   Fri Jan 20 11:52:18 2012 +0800

    glamor_gl_dispatch: fix the dispatch initialization on GLES2.
    
    Some gles2 implementation doesn's support get_proc_address.
    And we also need to avoid get those missing functions pointers
    when we are GLES2.
    
    Signed-off-by: Peng Li <peng.li at intel.com>
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit cfb5017712ca69af70a63e26a4b74c60b1af8589
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 10:56:17 2012 +0800

    glamor_render: Add non-Map/Unmap vertex array for GLES.
    
    As some GLES implementations' glMapOES /glUnmapOES is
    not so efficient, we implement the in memory vertex array
    for them.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 8afe856a93eedf9f21c0a5783a1a2b3149b88b6e
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 10:55:16 2012 +0800

    glamor_init: Should set gl_flavor before sub-module intialization.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit a126a5b55d5d590127773bfa7cb412c89c1edce7
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 10:04:21 2012 +0800

    glamor_composite: Fix one bug when we have too more vertices.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 108ad205819f0e131ede82bbdf9454072376c4dd
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Fri Jan 20 09:59:44 2012 +0800

    glamor-fbo-pool: Enable to reuse different size fbo/texture.
    
    Fixup three special cases, one is in tile and the other is in
    composite. Both cases are due to repeat texture issue. Maybe
    we can refine the shader to recalculate texture coords to
    support partial texture's repeating.
    
    The third is when upload a memory pixmap to texture, as now
    the texture may not have the exact size as the pixmap, we
    should not use the full rect coords.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 6c33fda0c4dab96041cd670f8d9741e1b7e68bbf
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Thu Jan 19 20:47:55 2012 +0800

    glamor-fbo-pool: Implement fbo cache mechanism.
    
    We classify the cache according to the texture's format/width/height.
    As openGL doesn't allow us to change a texture's format/width/height
    after the internal texture object is already allocated, we can't
    just calculate the size and then according ths size to put the
    fbo to an bucket which is just like SNA does. We can only put
    the fbo to the corresponding format/width/height bucket.
    
    This commit only support the exact size match. The following patch
    will remove this restriction, just need to handle the repeat/tile
    case when the size is not exactly match.
    
    Should use fls instead of ffs when decide the width/height bucket,
    thanks for Chris to point this out.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 7e90507d0f23c67abd7c16ba62ce1217826173bd
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Wed Jan 18 19:21:36 2012 +0800

    glamor_fbo: Introduce glamor fbo to manage all the fb/tex.
    
    This is the first patch to implement a fbo/tex pool mechanism which
    is like the sna's BO cache list. We firstly need to decopule the
    fbo/tex from each pixmap. The new glamor_pixmap_fbo data
    structure is for that purpose. It's somehow independent to each
    pixmap and can be reused latter by other pixmaps once it's detached
    from the current pixmap.
    
    And this commit also slightly change the way to create a
    memory pixmap. We will not create a pixmap private data structure
    by default, instead we will crete that structure when a memory
    pixmap is attaching a fbo to it.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 583a2ef4b0452767c93900e59e9ee9251829c3aa
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Wed Jan 18 17:12:32 2012 +0800

    glamor_set_pixmap_texture/screen_pixmap: Remove useless parameters.
    
    As after we got a texture, no matter the texture is created
    on the glamor_create_pixmap or on the egl layer, we all already
    know the texture's width and height there. We don't need
    to pass them in.
    
    This commit also simply the glamor_egl_create_textured_screen to
    reuse the egl_create_textured_pixmap. And also remove the useless
    root image from the egl private structure. As now the root image
    is bound to the screen image, we don't take care it separately
    here. It will be freed at the screen closing.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit d732f30eb4026e9e843d87ae6260625abd1ffef4
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Wed Jan 18 17:10:26 2012 +0800

    Add debug message for all the uploading path.
    
    The previous message missed the texture restoring path.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit 977720f15a224a788b5729f740c94d7db401b4b7
Author: Zhigang Gong <zhigang.gong at linux.intel.com>
Date:   Wed Jan 18 17:07:25 2012 +0800

    glamor_create_picture: Fix the format matching method.
    
    We should not simply set a TEXTURE_DRM pixmap to a separated
    texture pixmap. If the format is compatible with current fbo
    then it is just fine to keep it as TEXTURE_DRM type and we
    can safely fallback to DDX layer on it.
    
    Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>



More information about the xorg-commit mailing list