xserver: Branch 'master' - 5 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Jun 29 21:02:08 PDT 2015


 glamor/glamor.c                  |    4 +++-
 glamor/glamor_composite_glyphs.c |   20 ++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 0a625adeec465d6c7dcdb8622c53157b4e932bb0
Merge: 84128c1 790311c
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Jun 29 21:01:34 2015 -0700

    Merge remote-tracking branch 'anholt/glamor-next'

commit 790311cec30ac3d35e580b9f1266236f558033d4
Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 31 16:08:10 2015 -0700

    glamor: Don't try to disable attrib divisors without the extension.
    
    Fixes epoxy assertion failures on vc4.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index c30cbed..1f0d75e 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -266,9 +266,11 @@ glamor_glyphs_flush(CARD8 op, PicturePtr src, PicturePtr dst,
 
     glDisable(GL_SCISSOR_TEST);
 
-    glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0);
+    if (glamor_glyph_use_130(glamor_priv)) {
+        glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0);
+        glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
+    }
     glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
-    glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
     glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
     glDisable(GL_BLEND);
 }
commit 9c679d06055cc62aa9209318705e87dc33fba4c8
Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 31 16:07:01 2015 -0700

    glamor: Skip actual FBO setup in our glyph atlas.
    
    VC4 (and many GLES2 renderers) can't render to GL_ALPHA, so our pixmap
    would end up as GLAMOR_MEMORY and our dereference of the FBO would
    setfault.  Instead, tell the pixmap creation that we don't need an FBO
    at all.  Our glyph upload path was already glTexImage for non-a1, and
    a more general software fallback for a1 (since the glyph is also in
    system memory).
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index 47bf647..c30cbed 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -112,7 +112,8 @@ glamor_glyph_atlas_init(ScreenPtr screen, struct glamor_glyph_atlas *atlas)
     PictFormatPtr               format = atlas->format;
 
     atlas->atlas = glamor_create_pixmap(screen, glamor_priv->glyph_atlas_dim,
-                                        glamor_priv->glyph_atlas_dim, format->depth, 0);
+                                        glamor_priv->glyph_atlas_dim, format->depth,
+                                        GLAMOR_CREATE_FBO_NO_FBO);
     atlas->x = 0;
     atlas->y = 0;
     atlas->row_height = 0;
commit 077bb1bdea0fa9af846c02896df680293cf9e25c
Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 31 15:46:55 2015 -0700

    glamor: Clean up some declarations in glyph rendering.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index 39ed854..47bf647 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -331,8 +331,6 @@ glamor_composite_glyphs(CARD8 op,
     ScreenPtr screen = drawable->pScreen;
     glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
     glamor_program *prog = NULL;
-    PicturePtr glyph_pict = NULL;
-    DrawablePtr glyph_draw;
     glamor_program_render       *glyphs_program = &glamor_priv->glyphs_program;
     struct glamor_glyph_atlas    *glyph_atlas = NULL;
     int x = 0, y = 0;
@@ -360,11 +358,10 @@ glamor_composite_glyphs(CARD8 op,
             /* Glyph not empty?
              */
             if (glyph->info.width && glyph->info.height) {
-                glamor_pixmap_private *glyph_pix_priv;
-
-                glyph_pict = GlyphPicture(glyph)[screen_num];
-                glyph_draw = glyph_pict->pDrawable;
-                glyph_pix_priv = glamor_get_pixmap_private((PixmapPtr) glyph_draw);
+                PicturePtr glyph_pict = GlyphPicture(glyph)[screen_num];
+                DrawablePtr glyph_draw = glyph_pict->pDrawable;
+                glamor_pixmap_private *glyph_pix_priv =
+                    glamor_get_pixmap_private((PixmapPtr) glyph_draw);
 
                 /* Need to draw with slow path?
                  */
commit bf7a3bcb00d0dce22ff3fe42fe6236beeab4403b
Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 31 15:28:39 2015 -0700

    glamor: Actually allow glyphs of dimension 65 to 128 in the cache.
    
    The cache was trying to allow glyph_max_dim in, but since we were
    putting over 64x64 into HW memory, it would end up in the
    single-glyph-per-render bail_one path.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Keith Packard <keithp at keithp.com>

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 807f28e..71ca4f4 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -160,7 +160,9 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
         return NullPixmap;
 
     if ((usage == GLAMOR_CREATE_PIXMAP_CPU
-         || (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE && w <= 64 && h <= 64)
+         || (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE &&
+             w <= glamor_priv->glyph_max_dim &&
+             h <= glamor_priv->glyph_max_dim)
          || (w == 0 && h == 0)
          || !glamor_check_pixmap_fbo_depth(depth))
         || (!GLAMOR_TEXTURED_LARGE_PIXMAP &&


More information about the xorg-commit mailing list