glamor: Changes to 'master'

Zhigang Gong gongzg at kemper.freedesktop.org
Thu Mar 13 07:19:29 PDT 2014


 src/Makefile.am           |    1 
 src/glamor.c              |   16 +
 src/glamor.h              |    1 
 src/glamor_addtraps.c     |    2 
 src/glamor_copyarea.c     |   22 --
 src/glamor_copyplane.c    |   15 +
 src/glamor_core.c         |   40 +++-
 src/glamor_fbo.c          |    2 
 src/glamor_fill.c         |   88 +++++-----
 src/glamor_fillspans.c    |   12 -
 src/glamor_getspans.c     |    2 
 src/glamor_gl_dispatch.c  |    2 
 src/glamor_gl_dispatch.h  |    3 
 src/glamor_glyphblt.c     |  257 ++++++++++++++++++++++++++++++
 src/glamor_gradient.c     |   68 --------
 src/glamor_picture.c      |    7 
 src/glamor_pixmap.c       |  346 ++++++++++++++++++++++++++++++++++++++---
 src/glamor_polyfillrect.c |   11 -
 src/glamor_polylines.c    |   11 -
 src/glamor_priv.h         |   69 ++++----
 src/glamor_putimage.c     |    8 
 src/glamor_render.c       |  108 +++---------
 src/glamor_setspans.c     |   12 +
 src/glamor_tile.c         |    6 
 src/glamor_trapezoid.c    |   74 ++------
 src/glamor_triangles.c    |   16 -
 src/glamor_utils.h        |  385 +++-------------------------------------------
 src/glamor_vbo.c          |   98 +++++++++++
 28 files changed, 948 insertions(+), 734 deletions(-)

New commits:
commit a4fbc7732a1e56de385f50b778aafbdd186e015c
Author: Alex Deucher <alexander.deucher at amd.com>
Date:   Sun Mar 2 15:13:51 2014 +0100

    glamor add dispatch for glGetError and glBufferStorage
    
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
    Reviewed-by: Zhigang Gong <zhigang.gong at linux.intel.com>

commit f78901e86322ad05353daa9d8d065e1b86eb4276
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:29 2014 -0500

    glamor: Move shader precision stuff from build time to shader compile time.
    
    Ported from Eric's glamor xserver tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit bc04fd75b37b7e553289e97692ba279480874294
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:28 2014 -0500

    glamor: Don't try to fallback sub-upload to an in-memory pixmap.
    
    This path needs to draw to the pixmap using its fbo, while an
    in-memory pixmap doesn't have one.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 652250c3925c98f19107b7ff5101e4e5fe6a576c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:27 2014 -0500

    glamor: Fix requested composite VBO size.
    
    The argument to setup_composte_vbo is the number of verts.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit bcc1f164b35925d74e4cc363de206c53ed514edf
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:26 2014 -0500

    glamor: Don't forget to unmap our PBOs before usng them to upload.
    
    From the GL_ARB_vertex_buffer_object spec:
    
        After the client has specified the contents of a mapped data store,
        and before the data in that store are dereferenced by any GL commands,
        the mapping must be relinquished by calling
    
            boolean UnmapBufferARB(enum target);
    
    Our mappings were only getting reaped at PBO destroy time, after the
    upload. If the GL implementation wasn't coherent, it would have used
    stale data to do the texture upload.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 5044c1d10b44ead9312c38b6f40f5cc49ae8d5b1
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:25 2014 -0500

    glamor: Add am assert about an invariant the upload code relies on.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 73ab7f48c779fa6b6d7e796789c3c525123d59ec
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:24 2014 -0500

    glamor: Make sure we've put the context back to 0 periodically.
    
    We've got some leaks in the tree.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 860c08b797fde2c94461b088745ff173e7d22d40
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:23 2014 -0500

    glamor: Fix ignoring the ALU during SetSpans().
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 307ad4776c02aa8fffc585bef834f060ef37c369
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:22 2014 -0500

    glamor: Improve the performance of PolyGlyphBlt.
    
    Using the same idea as the previous PushPixels code, just make points
    for each point in the glyph. This is an advantage over the pushpixels
    fallback because we can batch the BO mappings and draw calls across
    glyphs.
    
    Improves performance of x11perf -f8text by 881.481% +/- 50.5971% (n=6).
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 2c4e865ca50fab95eed2c32bd48d1c13ac4237ba
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:21 2014 -0500

    glamor: Improve the performance of PushPixels by, well, pushing pixels.
    
    Otherwise, mi will fall back to GetSpans()ing the bitmap, walking the
    bitmap, computing spans to be filled, and calling FillSpans().
    
    Improves x11perf -f23text16 by 49.8918% +/- 7.81351% (n=4).
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 97220f5c23b8fe75f07ac22498c9dca9bc7fc69c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:20 2014 -0500

    glamor: Use quads instead of index buffer on desktop.
    
    No difference (n=7)
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 7ed9221f08157afa82af33980682dc637f3d0f0a
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:19 2014 -0500

    glamor: Use streamed vertex data for solid fills.
    
    No difference on performance in x11perf -f8text (n=15), but if we ever
    get GL_ARB_buffer_storage support, it should be worth a few percent
    CPU overhead on Intel.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 3eb7ba02f337806a613f2afd0cbe724435dd9308
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:18 2014 -0500

    glamor: Add missing prepares on the GC during fb fallbacks.
    
    We had regressions in CopyPlane reported by xts5, because we were
    (successfully!) dereferencing the null pixmap->devPrivate.ptr for a
    tile or stipple without having done a prepare.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 6f16980babbb184ba83927de2db71449b4a3389f
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:17 2014 -0500

    glamor: Rely on nested mappings to handle src==dst and !prepare bugs.
    
    Now that the core deals with that for us, we can avoid all this extra
    carefulness.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 7a4d37e3722dfec029e8e2d32d944ee3b12d9078
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:16 2014 -0500

    glamor: Allow nested mapping of pixmaps.
    
    The common pattern is to do nested if statements making calls to
    prepare_access() and then popping those mappings back off in each set
    of braces. Some cases checked for src == dst to avoid leaking
    mapping, but others didn't. Others didn't even do the nested
    mappings, so a failure in the outer would result in trying to umap the
    inner and failing.
    
    By allowing nested mappings, we can fix both problems by not requiring
    the care from the caller, plus we can allow a simpler nesting of all
    the prepares in one if statement.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit b68a6f00dbe9ea7b7bf622fc50a6e67e50ce3f9a
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:15 2014 -0500

    glamor: Drop unused GLAMOR_ACCESS_WO.
    
    Nothing was using it, and it was going to complicate the
    glamor_prepare_access bugfixing I'm going to do next.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 50b31c4d0bd51c91f14a821383e466967d2cdc12
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:14 2014 -0500

    glamor: Replace some goofy enum-likes with a real enum.
    
    This unpacks the bitfield into an int size, but my experience has been
    that packing bitfields doesn't matter for performance.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 6546108f9689e771b91d5cdd6bd461b7dbd6bd50
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:13 2014 -0500

    glamor: Extract the streamed vertex data code used by Render. (v2)
    
    We should be uploading any vertex data using this kind of upload
    style, since it saves a bunch of extra copies of our vertex data.
    
    Ported from Eric's glamor xserver tree.
    
    v2: fix composite_vbo_offset init in trapezoid rendering
    
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 1bed3cc8ce8b0b24c37daa79b375ba2cf94ef008
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:12 2014 -0500

    glamor: Fix up doxygen for glamor_fill.c.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 073a7d37ee70d52cb1db3857b3521af5805fdd15
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:11 2014 -0500

    glamor: Rename more solid fill variables to clean up the code.
    
    Now the error path of allocation is more obvious: We leave things in
    the a-few-boxes-at-a-time stack memory state.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit b951818ab40834530c7d9b9e2c29ff259401ce18
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:10 2014 -0500

    glamor: Rename a variable to be more descriptive.
    
    The "valid_" prefix was used above to describe our allocation that
    gets reused multiple times, which is totally unrelated.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit c6a09f7f51a5debb3be43c75e7418a11c33085ea
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:09 2014 -0500

    glamor: Fix some integer overflow errors.
    
    Imagine a nbox that was (UINT_MAX + small number) / 4 * 2 *
    sizeof(float). We'd malloc a few bytes after the integer overflow,
    but glamor_set_normalize_vcoords would write over gigabytes of heap.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit f674371926323b34a066b01c4fad8a306bfe5717
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:08 2014 -0500

    glamor: Drop bogus _X_UNLIKELY.
    
    nbox > 4 is actually quite common for spans handling.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 8af10ae1fae991297454a427864100bedb306662
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:07 2014 -0500

    glamor: Avoid generating GL errors when doing two-pass CA.
    
    We were double-unmapping the VBO, and the second would throw an error.
    
    Ported from Eric's glamor xserver tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit c3e8136b9ab926be252dada4e9fb40bd749896a6
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:06 2014 -0500

    glamor: Don't forget to set GL_INVALIDATE_RANGE_BIT on GL_ARB_mbr.
    
    We don't need any current contents of the buffer, and this allows an
    implementation to make a temporary BO for a streamed upload if it
    wants to.
    
    Ported from Eric's glamor xserver tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 4ea6805ae90a9e1e041f424f4e80d15e5649f4a8
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:05 2014 -0500

    glamor: Don't bother keeping references to shader stages for gradients.
    
    They never get reattached to any other program, so saving them to
    unreference later is a waste of code.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit d3edb1bb42ce1d52f36f5456190dc154023740ed
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:04 2014 -0500

    glamor: Fix typo in setting v_position's attrib location.
    
    Assuming it was the first attribute assigned by the GL, it would have
    ended up with location 0 anyway.
    
    Ported from Eric's glamor xserver tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 6a2e3aad40d5e5bfb1f5d56c2387b8246ae17480
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:03 2014 -0500

    glamor: Unifdef the picture-format-to-format-and-type functions.
    
    There's no way these should be in a header file, but I'll leave that
    cleanup until later.
    
    Ported from Eric's glamor xserver tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit f41d70891fccee9bdd915748eb003949945b7416
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:02 2014 -0500

    glamor: Move glamor_get_tex_format_type_from_pictformat to a .c file.
    
    A pair of 150 lines of inlined switch statements in a header file is
    crazy.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 553a1367ab5c2b70907634674117a8f9078f1912
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:01 2014 -0500

    glamor: Unifdef the cache format indices.
    
    We only ask for GL_RGB on desktop GL as far as I can see, but now if
    GLES2 did happen to ask for GL_RGB it would return a cache index
    instead of -1.
    
    Pulled from Eric's glamor xserver tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit b68223a660aa9bcb8b86411dec21d4b99b0bdbbb
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:02:00 2014 -0500

    glamor: Pass pixmaps around to unifdef glamor_iformat_for_depth().
    
    Pulled from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 577a30abf7a02ec4cb8bdc1e0280b3d66d6f5132
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:01:59 2014 -0500

    glamor: yInverted is a boolean value, so use the Bool type.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 49b88d62fef1ded7acb7f6aee4c59f8e7e7fe2a4
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:01:58 2014 -0500

    glamor: Drop useless glEnable/glDisable(GL_TEXTURE_2D) calls.
    
    Those calls are only for enabling texture handling in the fixed
    function pipeline, while everything we do is with shaders.
    
    Ported from Eric's xserver glamor tree.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit e2a9300cc7d48ed38a527befa163b810b9a4ca19
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:01:57 2014 -0500

    glamor: Drop fixed function transformation matrix setup.
    
    gl_ModelViewProjection and friends aren't used in our shaders, so this
    setup didn't do anything.
    
    Pulled from Eric's xserver glamor port.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

commit 6c8f1f17490017ff01a3b43d32067fc91da3bac1
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Feb 28 13:01:56 2014 -0500

    glamor: Fix a spelling mistake in GLAMOR_PIXMAP_FBO_NOT_EXACT_SIZE.
    
    Pulled from Eric's xserver glamor.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>



More information about the xorg-commit mailing list