[Mesa-dev] [PATCH 1/2] st/xlib: Fix upside down coordinates for CopySubBuffer

Stéphane Marchesin marcheu at chromium.org
Sat May 11 13:38:35 PDT 2013


The coordinates need to be inverted between glX and gallium.
---
 src/gallium/state_trackers/glx/xlib/xm_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index e426192..4f10b84 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -1256,7 +1256,7 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height )
 {
    xmesa_copy_st_framebuffer(b->stfb,
          ST_ATTACHMENT_BACK_LEFT, ST_ATTACHMENT_FRONT_LEFT,
-         x, y, width, height);
+         x, b->height - y - height, width, height);
 }
 
 
-- 
1.8.2.1



More information about the mesa-dev mailing list