summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxcmds.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2007-05-16 15:50:40 -0400
committerKristian Høgsberg <[email protected]>2007-10-11 11:11:12 -0400
commita7a0a2beb54dcb78d7e0ab64cf2f5a6ede8191a4 (patch)
tree59e4e5041b8fc8a7a0c1f44dd6cd185d4df16bc3 /src/glx/x11/glxcmds.c
parent78a6aa57a0155d72280dd91c05513c847bf76f3b (diff)
Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism.
Diffstat (limited to 'src/glx/x11/glxcmds.c')
-rw-r--r--src/glx/x11/glxcmds.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index e2deca59686..2b0403d37c9 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -1835,15 +1835,13 @@ static int __glXGetSwapIntervalMESA(void)
static GLint __glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
{
int status = GLX_BAD_CONTEXT;
-#ifdef GLX_DIRECT_RENDERING
+#ifdef __DRI_FRAME_TRACKING
int screen;
__DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen);
__GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen);
- if ( (pdraw != NULL) && (pdraw->frameTracking != NULL)
- && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) {
- status = pdraw->frameTracking(pdraw, GL_TRUE);
- }
+ if (pdraw != NULL && psc->frameTracking != NULL)
+ status = psc->frameTracking->frameTracking(pdraw, GL_TRUE);
#else
(void) dpy;
(void) drawable;
@@ -1855,15 +1853,13 @@ static GLint __glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
static GLint __glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
{
int status = GLX_BAD_CONTEXT;
-#ifdef GLX_DIRECT_RENDERING
+#ifdef __DRI_FRAME_TRACKING
int screen;
__DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen);
__GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen);
- if ( (pdraw != NULL) && (pdraw->frameTracking != NULL)
- && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) {
- status = pdraw->frameTracking(pdraw, GL_FALSE);
- }
+ if (pdraw != NULL && psc->frameTracking != NULL)
+ status = psc->frameTracking->frameTracking(pdraw, GL_FALSE);
#else
(void) dpy;
(void) drawable;
@@ -1876,18 +1872,19 @@ static GLint __glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable,
GLfloat *usage)
{
int status = GLX_BAD_CONTEXT;
-#ifdef GLX_DIRECT_RENDERING
+#ifdef __DRI_FRAME_TRACKING
int screen;
__DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen);
__GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen);
- if ( (pdraw != NULL ) && (pdraw->queryFrameTracking != NULL)
- && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) {
- int64_t sbc, missedFrames;
- float lastMissedUsage;
+ if (pdraw != NULL && psc->frameTracking != NULL) {
+ int64_t sbc, missedFrames;
+ float lastMissedUsage;
- status = pdraw->queryFrameTracking(pdraw, &sbc, &missedFrames,
- &lastMissedUsage, usage);
+ status = psc->frameTracking->queryFrameTracking(pdraw, &sbc,
+ &missedFrames,
+ &lastMissedUsage,
+ usage);
}
#else
(void) dpy;
@@ -1903,17 +1900,16 @@ static GLint __glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable,
GLfloat *lastMissedUsage)
{
int status = GLX_BAD_CONTEXT;
-#ifdef GLX_DIRECT_RENDERING
+#ifdef __DRI_FRAME_TRACKING
int screen;
__DRIdrawable * const pdraw = GetDRIDrawable(dpy, drawable, & screen);
__GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen);
- if ( (pdraw != NULL ) && (pdraw->queryFrameTracking != NULL)
- && __glXExtensionBitIsEnabled( psc, MESA_swap_frame_usage_bit ) ) {
+ if (pdraw != NULL && psc->frameTracking != NULL) {
float usage;
- status = pdraw->queryFrameTracking(pdraw, sbc, missedFrames,
- lastMissedUsage, &usage);
+ status = psc->frameTracking->queryFrameTracking(pdraw, sbc, missedFrames,
+ lastMissedUsage, &usage);
}
#else
(void) dpy;