summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/dri2_glx.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-11-12 15:24:45 -0500
committerKristian Høgsberg <[email protected]>2008-11-12 15:26:25 -0500
commite1fbb30211549f2ee79d8ff9764f833e5317bebe (patch)
tree45cef4629d728dab83edc2c4949940fbcc8c44dc /src/glx/x11/dri2_glx.c
parentbecf3d927255385592c8c6659c4555cf2dd2842d (diff)
glFlush before CopySubBuffer, fix coordinates and extension name typo.
Diffstat (limited to 'src/glx/x11/dri2_glx.c')
-rw-r--r--src/glx/x11/dri2_glx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index c16df6b7c2f..2bee67780bd 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);