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:
Adam Jackson 2017-10-24 14:28:33 -04:00
parent 13409b91b1
commit 1edac5c1ce
2 changed files with 1 additions and 21 deletions

View File

@ -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. */

View File

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