glamor-gles2: Fixup the pixmap before read back if it is not readable.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2012-01-29 14:14:36 +08:00 committed by Eric Anholt
parent 36ac9b7191
commit 566cca59e1
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ _glamor_get_spans(DrawablePtr drawable,
glamor_validate_pixmap(pixmap);
if (glamor_priv->gl_flavor == GLAMOR_GL_ES2
&& (glamor_tex_format_is_readable(format) || !no_revert)) {
&& (!glamor_tex_format_is_readable(format) || !no_revert)) {
/* XXX prepare whole pixmap is not efficient. */
temp_pixmap =

View File

@ -685,7 +685,7 @@ glamor_download_pixmap_to_cpu(PixmapPtr pixmap, glamor_access_t access)
glamor_validate_pixmap(pixmap);
if (glamor_priv->gl_flavor == GLAMOR_GL_ES2
&& (glamor_tex_format_is_readable(format) || !no_revert)) {
&& (!glamor_tex_format_is_readable(format) || !no_revert)) {
temp_pixmap =
glamor_es2_pixmap_read_prepare(pixmap, &format,
&type, no_alpha,