summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-03-31 15:48:04 +0000
committerBrian Paul <[email protected]>2006-03-31 15:48:04 +0000
commitf2ad1b60c0da11283b399008f491792790cea294 (patch)
treeed81cb738dd06f961713fb9e34827a3b57832cca /src/mesa/drivers/dri/common
parentdf3d4e0bb9ce40b3380734cf4f209a7363d5dcfd (diff)
Dave Reveman's patch for GLX_MESA_copy_sub_buffer support
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c10
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 883a89c8886..d68837b545a 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -547,6 +547,13 @@ static int64_t driSwapBuffersMSC( __DRInativeDisplay * dpy, void *drawablePriv,
remainder );
}
+static void driCopySubBuffer( __DRInativeDisplay *dpy, void *drawablePrivate,
+ int x, int y, int w, int h)
+{
+ __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
+ dPriv->driScreenPriv->DriverAPI.CopySubBuffer(dPriv, x, y, w, h);
+ (void) dpy;
+}
/**
* This is called via __DRIscreenRec's createNewDrawable pointer.
@@ -623,6 +630,9 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
pdraw->frameTracking = NULL;
pdraw->queryFrameTracking = driQueryFrameTracking;
+ if (driCompareGLXAPIVersion (20060314) >= 0)
+ pdraw->copySubBuffer = driCopySubBuffer;
+
/* This special default value is replaced with the configured
* default value when the drawable is first bound to a direct
* rendering context.
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index b9b38f39cd6..14c24a0efaa 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -189,6 +189,8 @@ struct __DriverAPIRec {
int64_t (*SwapBuffersMSC)( __DRIdrawablePrivate *priv, int64_t target_msc,
int64_t divisor, int64_t remainder );
/*@}*/
+ void (*CopySubBuffer)(__DRIdrawablePrivate *driDrawPriv,
+ int x, int y, int w, int h);
};