summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/dri_util.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@hinata.boston.redhat.com>2007-05-16 15:50:40 -0400
committerKristian Høgsberg <krh@redhat.com>2007-10-11 11:11:12 -0400
commita7a0a2beb54dcb78d7e0ab64cf2f5a6ede8191a4 (patch)
tree59e4e5041b8fc8a7a0c1f44dd6cd185d4df16bc3 /src/mesa/drivers/dri/common/dri_util.c
parent78a6aa57a0155d72280dd91c05513c847bf76f3b (diff)
Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism.
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.c')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index ba677f6ff8..7815f361a8 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -52,11 +52,6 @@ static const int empty_attribute_list[1] = { None };
*/
static int api_ver = 0;
-/* forward declarations */
-static int driQueryFrameTracking( __DRIdrawable *drawable,
- int64_t *sbc, int64_t *missedFrames,
- float *lastMissedUsage, float *usage );
-
static void *driCreateNewDrawable(__DRIscreen *screen,
const __GLcontextModes *modes,
__DRIdrawable *pdraw,
@@ -515,8 +510,6 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
pdraw->waitForSBC = driWaitForSBC;
pdraw->waitForMSC = driWaitForMSC;
pdraw->swapBuffersMSC = driSwapBuffersMSC;
- pdraw->frameTracking = NULL;
- pdraw->queryFrameTracking = driQueryFrameTracking;
/* This special default value is replaced with the configured
* default value when the drawable is first bound to a direct
@@ -826,6 +819,12 @@ int driCompareGLXAPIVersion( GLint required_version )
static int
+driFrameTracking(__DRIdrawable *drawable, GLboolean enable)
+{
+ return GLX_BAD_CONTEXT;
+}
+
+static int
driQueryFrameTracking(__DRIdrawable *drawable,
int64_t * sbc, int64_t * missedFrames,
float * lastMissedUsage, float * usage)
@@ -849,6 +848,11 @@ driQueryFrameTracking(__DRIdrawable *drawable,
return status;
}
+const __DRIframeTrackingExtension driFrameTrackingExtension = {
+ { __DRI_FRAME_TRACKING },
+ driFrameTracking,
+ driQueryFrameTracking
+};
/**
* Calculate amount of swap interval used between GLX buffer swaps.