Commit 1edac5c1 authored by Adam Jackson's avatar Adam Jackson 🎧

glamor: Unconditionalize GLAMOR_PIXMAP_DYNAMIC_UPLOAD

Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent 13409b91
......@@ -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. */
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment