xserver: Branch 'master' - 3 commits

Adam Jackson ajax at kemper.freedesktop.org
Mon Oct 30 17:20:24 UTC 2017


 glamor/glamor.c          |    7 +------
 glamor/glamor_gradient.c |    4 ----
 glamor/glamor_priv.h     |   10 ----------
 glamor/glamor_render.c   |   17 ++---------------
 4 files changed, 3 insertions(+), 35 deletions(-)

New commits:
commit 2230e6c8af92b041821eee0ea6210eda82c74106
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 24 14:28:34 2017 -0400

    glamor: Unconditionalize GLAMOR_TEXTURED_LARGE_PIXMAP
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/glamor/glamor.c b/glamor/glamor.c
index c55ba249e..b70759b65 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -183,9 +183,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
              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 &&
-            !glamor_check_fbo_size(glamor_priv, w, h)))
+         || !glamor_check_pixmap_fbo_depth(depth)))
         return fbCreatePixmap(screen, w, h, depth, usage);
     else
         pixmap = fbCreatePixmap(screen, 0, 0, depth, usage);
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 5da400a37..ad54b3197 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -910,7 +910,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
 
 #include "glamor_utils.h"
 
-#define GLAMOR_TEXTURED_LARGE_PIXMAP 1
 #if 0
 #define MAX_FBO_SIZE 32         /* For test purpose only. */
 #endif
commit 1edac5c1ceb8b21af45b20397ff64177ad22466c
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 24 14:28:33 2017 -0400

    glamor: Unconditionalize GLAMOR_PIXMAP_DYNAMIC_UPLOAD
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index b828350cd..5da400a37 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -910,14 +910,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
 
 #include "glamor_utils.h"
 
-/* Dynamic pixmap upload to texture if needed.
- * Sometimes, the target is a gl texture pixmap/picture,
- * but the source or mask is in cpu memory. In that case,
- * upload the source/mask to gl texture and then avoid
- * fallback the whole process to cpu. Most of the time,
- * this will increase performance obviously. */
-
-#define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
 #define GLAMOR_TEXTURED_LARGE_PIXMAP 1
 #if 0
 #define MAX_FBO_SIZE 32         /* For test purpose only. */
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index 1a54aa9ec..7a96c82dd 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -762,7 +762,7 @@ glamor_set_normalize_tcoords_generic(PixmapPtr pixmap,
 /**
  * Returns whether the general composite path supports this picture
  * format for a pixmap that is permanently stored in an FBO (as
- * opposed to the GLAMOR_PIXMAP_DYNAMIC_UPLOAD path).
+ * opposed to the dynamic upload path).
  *
  * We could support many more formats by using GL_ARB_texture_view to
  * parse the same bits as different formats.  For now, we only support
@@ -915,12 +915,7 @@ glamor_composite_choose_shader(CARD8 op,
             glamor_fallback("source == dest\n");
         }
         if (source_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) {
-#ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD
             source_needs_upload = TRUE;
-#else
-            glamor_fallback("no texture in source\n");
-            goto fail;
-#endif
         }
     }
 
@@ -931,16 +926,10 @@ glamor_composite_choose_shader(CARD8 op,
             goto fail;
         }
         if (mask_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) {
-#ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD
             mask_needs_upload = TRUE;
-#else
-            glamor_fallback("no texture in mask\n");
-            goto fail;
-#endif
         }
     }
 
-#ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD
     if (source_needs_upload && mask_needs_upload
         && source_pixmap == mask_pixmap) {
 
@@ -1010,7 +999,6 @@ glamor_composite_choose_shader(CARD8 op,
             }
         }
     }
-#endif
 
     /* If the source and mask are two differently-formatted views of
      * the same pixmap bits, and the pixmap was already uploaded (so
commit 13409b91b1936330dbf19bacefa4b48d0b6843b8
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 24 14:28:32 2017 -0400

    glamor: Unconditionalize GLAMOR_GRADIENT_SHADER
    
    Effectively always true anyway.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Eric Anholt <eric at anholt.net>

diff --git a/glamor/glamor.c b/glamor/glamor.c
index d06934595..c55ba249e 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -710,10 +710,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
     ps->Glyphs = glamor_composite_glyphs;
 
     glamor_init_vbo(screen);
-
-#ifdef GLAMOR_GRADIENT_SHADER
     glamor_init_gradient_shader(screen);
-#endif
     glamor_pixmap_init(screen);
     glamor_sync_init(screen);
 
diff --git a/glamor/glamor_gradient.c b/glamor/glamor_gradient.c
index 0c97ce7cb..2f2a5cc9b 100644
--- a/glamor/glamor_gradient.c
+++ b/glamor/glamor_gradient.c
@@ -38,8 +38,6 @@
 #define RADIAL_SMALL_STOPS (6 + 2)
 #define RADIAL_LARGE_STOPS (16 + 2)
 
-#ifdef GLAMOR_GRADIENT_SHADER
-
 static const char *
 _glamor_create_getcolor_fs_source(ScreenPtr screen, int stops_count,
                                   int use_array)
@@ -1451,5 +1449,3 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
     glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
     return NULL;
 }
-
-#endif                          /* End of GLAMOR_GRADIENT_SHADER */
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 7050df526..b828350cd 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -918,7 +918,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
  * this will increase performance obviously. */
 
 #define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
-#define GLAMOR_GRADIENT_SHADER
 #define GLAMOR_TEXTURED_LARGE_PIXMAP 1
 #if 0
 #define MAX_FBO_SIZE 32         /* For test purpose only. */
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index 3e126f0f2..1a54aa9ec 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1343,7 +1343,6 @@ glamor_convert_gradient_picture(ScreenPtr screen,
         pFormat = PictureMatchFormat(screen, 32, format);
     }
 
-#ifdef GLAMOR_GRADIENT_SHADER
     if (!source->pDrawable) {
         if (source->pSourcePict->type == SourcePictTypeLinear) {
             dst = glamor_generate_linear_gradient_picture(screen,
@@ -1362,7 +1361,7 @@ glamor_convert_gradient_picture(ScreenPtr screen,
             return dst;
         }
     }
-#endif
+
     pixmap = glamor_create_pixmap(screen,
                                   width,
                                   height,


More information about the xorg-commit mailing list