glamor: Unconditionalize GLAMOR_PIXMAP_DYNAMIC_UPLOAD
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
		
							parent
							
								
									13409b91b1
								
							
						
					
					
						commit
						1edac5c1ce
					
				| 
						 | 
					@ -910,14 +910,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "glamor_utils.h"
 | 
					#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
 | 
					#define GLAMOR_TEXTURED_LARGE_PIXMAP 1
 | 
				
			||||||
#if 0
 | 
					#if 0
 | 
				
			||||||
#define MAX_FBO_SIZE 32         /* For test purpose only. */
 | 
					#define MAX_FBO_SIZE 32         /* For test purpose only. */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -762,7 +762,7 @@ glamor_set_normalize_tcoords_generic(PixmapPtr pixmap,
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Returns whether the general composite path supports this picture
 | 
					 * Returns whether the general composite path supports this picture
 | 
				
			||||||
 * format for a pixmap that is permanently stored in an FBO (as
 | 
					 * 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
 | 
					 * 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
 | 
					 * 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");
 | 
					            glamor_fallback("source == dest\n");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (source_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) {
 | 
					        if (source_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) {
 | 
				
			||||||
#ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD
 | 
					 | 
				
			||||||
            source_needs_upload = TRUE;
 | 
					            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;
 | 
					            goto fail;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (mask_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) {
 | 
					        if (mask_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) {
 | 
				
			||||||
#ifdef GLAMOR_PIXMAP_DYNAMIC_UPLOAD
 | 
					 | 
				
			||||||
            mask_needs_upload = TRUE;
 | 
					            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
 | 
					    if (source_needs_upload && mask_needs_upload
 | 
				
			||||||
        && source_pixmap == mask_pixmap) {
 | 
					        && 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
 | 
					    /* If the source and mask are two differently-formatted views of
 | 
				
			||||||
     * the same pixmap bits, and the pixmap was already uploaded (so
 | 
					     * the same pixmap bits, and the pixmap was already uploaded (so
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue