[Glamor] [PATCH] Don't use glBlitFramebufferEXT for overlapping copies.

Michel Dänzer michel at daenzer.net
Wed Oct 31 08:56:00 PDT 2012


From: Michel Dänzer <michel.daenzer at amd.com>

According to the GL_EXT_framebuffer_blit spec, the result of doing so is
undefined. But we need well-defined results. :)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/glamor_copyarea.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glamor_copyarea.c b/src/glamor_copyarea.c
index 7d06833..4e6f953 100644
--- a/src/glamor_copyarea.c
+++ b/src/glamor_copyarea.c
@@ -318,7 +318,8 @@ __glamor_copy_n_to_n(DrawablePtr src,
 		dx, dy,
 		src_pixmap, dst_pixmap);
 #ifndef GLAMOR_GLES2
-	if ((overlaped || glamor_priv->state != RENDER_STATE
+	if (!overlaped &&
+	    (glamor_priv->state != RENDER_STATE
 	     || !src_pixmap_priv->base.gl_tex || !dst_pixmap_priv->base.gl_tex)
 	    && glamor_copy_n_to_n_fbo_blit(src, dst, gc, box, nbox, dx,
 					   dy)) {
-- 
1.7.10.4



More information about the Glamor mailing list