From becf3d927255385592c8c6659c4555cf2dd2842d Mon Sep 17 00:00:00 2001 From: Hanno Böck Date: Wed, 12 Nov 2008 06:56:42 -0700 Subject: glx: fix xcb build --- src/glx/x11/single2.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/glx') diff --git a/src/glx/x11/single2.c b/src/glx/x11/single2.c index fc9c63a464..b008c6996c 100644 --- a/src/glx/x11/single2.c +++ b/src/glx/x11/single2.c @@ -37,6 +37,11 @@ #include "indirect_vertex_array.h" #include "dispatch.h" #include "glapi.h" +#ifdef USE_XCB +#include +#include +#endif /* USE_XCB */ + /* Used for GL_ARB_transpose_matrix */ static void -- cgit v1.2.3 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 ++++++- src/glx/x11/dri_common.c | 2 +- src/glx/x11/glxcmds.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/glx') 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); diff --git a/src/glx/x11/dri_common.c b/src/glx/x11/dri_common.c index fcb579f3bf..4fda649e59 100644 --- a/src/glx/x11/dri_common.c +++ b/src/glx/x11/dri_common.c @@ -340,7 +340,7 @@ driBindExtensions(__GLXscreenConfigs *psc, int dri2) #ifdef __DRI_COPY_SUB_BUFFER if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { psc->driCopySubBuffer = (__DRIcopySubBufferExtension *) extensions[i]; - __glXEnableDirectExtension(psc, "GLX_MESA_copy_sub_buffer_bit"); + __glXEnableDirectExtension(psc, "GLX_MESA_copy_sub_buffer"); } #endif diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 4e2641bd69..391e0be05e 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -2500,6 +2500,7 @@ static void __glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable, if ( pdraw != NULL ) { __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); if (psc->driScreen->copySubBuffer != NULL) { + glFlush(); (*psc->driScreen->copySubBuffer)(pdraw, x, y, width, height); } -- cgit v1.2.3