From e1fbb30211549f2ee79d8ff9764f833e5317bebe Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Wed, 12 Nov 2008 15:24:45 -0500 Subject: glFlush before CopySubBuffer, fix coordinates and extension name typo. --- src/glx/x11/dri2_glx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/glx/x11/dri2_glx.c') diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index c16df6b7c2..2bee67780b 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -186,11 +186,12 @@ static __GLXDRIdrawable *dri2CreateDrawable(__GLXscreenConfigs *psc, static void dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, int width, int height) { + __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw; XRectangle xrect; XserverRegion region; xrect.x = x; - xrect.y = y; + xrect.y = priv->height - y - height; xrect.width = width; xrect.height = height; @@ -331,7 +332,11 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen, psp->createContext = dri2CreateContext; psp->createDrawable = dri2CreateDrawable; psp->swapBuffers = dri2SwapBuffers; + + /* DRI2 suports SubBuffer through DRI2CopyRegion, so it's always + * available.*/ psp->copySubBuffer = dri2CopySubBuffer; + __glXEnableDirectExtension(psc, "GLX_MESA_copy_sub_buffer"); Xfree(driverName); Xfree(deviceName); -- cgit v1.2.3