Commit 566cca59 authored by Zhigang Gong's avatar Zhigang Gong Committed by Eric Anholt

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

Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent 36ac9b71
......@@ -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 =
......
......@@ -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,
......
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