if (intel->driDrawable != driDrawPriv) {
if (driDrawPriv->pdraw->swap_interval == (unsigned)-1) {
+#if VBL
int i;
intel_fb->vblank_flags = driGetDefaultVBlankFlags(&intel->optionCache);
for (i = 0; i < 2; i++) {
intel_fb->vbl_pending[i] = intel_fb->vbl_seq;
}
+#endif
}
}
}
curbuf = 0; /* current draw buf: 0 = front, 1 = back */
+#if VBL
if (intel_fb && intel_fb->vblank_flags &&
!(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) &&
(intel_fb->vbl_waited - intel_fb->vbl_pending[curbuf]) > (1<<23)) {
drmWaitVBlank(intel->driFd, &vbl);
intel_fb->vbl_waited = vbl.reply.sequence;
}
+#endif
DRM_CAS(intel->driHwLock, intel->hHWContext,
(DRM_LOCK_HELD|intel->hHWContext), __ret);
}
intel_fb = dPriv->driverPrivate;
+#if VBL
sInfo->swap_count = intel_fb->swap_count;
sInfo->swap_ust = intel_fb->swap_ust;
sInfo->swap_missed_count = intel_fb->swap_missed_count;
sInfo->swap_missed_usage = (sInfo->swap_missed_count != 0)
? driCalculateSwapUsage(dPriv, 0, intel_fb->swap_missed_ust)
: 0.0;
+#endif
return 0;
}
intelUpdateFramebufferSize(ctx, dPriv);
intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
+#if VBL
{
drmI830Sarea *sarea = intel->sarea;
drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w,
}
}
-
+#endif
}
+#if VBL
static GLboolean
intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
{
return ret;
}
+#endif
+
void
intelSwapBuffers(__DRIdrawablePrivate * dPriv)
_mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */
+#if VBL
if (!intelScheduleSwap(dPriv, &missed_target)) {
struct pipe_surface *back_surf
= get_color_surface(intel_fb, BUFFER_BACK_LEFT);
intelDisplayBuffer(dPriv, back_surf, NULL);
}
+#else
+ {
+ struct pipe_surface *back_surf
+ = get_color_surface(intel_fb, BUFFER_BACK_LEFT);
+ intelDisplayBuffer(dPriv, back_surf, NULL);
+ }
+#endif
+#if VBL
intel_fb->swap_count++;
(*dri_interface->getUST) (&ust);
if (missed_target) {
}
intel_fb->swap_ust = ust;
+#endif
}
}
else {