OSDN Git Service

st/xlib: Fix upside down coordinates for CopySubBuffer
authorStéphane Marchesin <marcheu@chromium.org>
Sat, 11 May 2013 01:29:52 +0000 (18:29 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Sat, 8 Jun 2013 01:53:54 +0000 (18:53 -0700)
The coordinates need to be inverted between glX and gallium.

NOTE: This is a candidate for stable release branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/state_trackers/glx/xlib/xm_api.c

index 66d29a5..c39968d 100644 (file)
@@ -1255,7 +1255,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);
 }