[PATCH xserver 2/3] glamor: Unconditionalize GLAMOR_PIXMAP_DYNAMIC_UPLOAD

Adam Jackson ajax at redhat.com
Tue Oct 24 18:28:33 UTC 2017


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glamor/glamor_priv.h   |  8 --------
 glamor/glamor_render.c | 14 +-------------
 2 files changed, 1 insertion(+), 21 deletions(-)

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
-- 
2.14.2



More information about the xorg-devel mailing list