#include <sched.h>
#include <errno.h>
-#include "glheader.h"
-#include "imports.h"
-#include "macros.h"
-#include "context.h"
+#include "main/glheader.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/context.h"
#include "swrast/swrast.h"
#include "r300_context.h"
#include "radeon_ioctl.h"
GLint nbox, i, ret;
GLboolean missed_target;
int64_t ust;
+ __DRIscreenPrivate *psp = dPriv->driScreenPriv;
assert(dPriv);
assert(dPriv->driContextPriv);
if (rect->y2 < b->y2)
b->y2 = rect->y2;
- if (b->x1 < b->x2 && b->y1 < b->y2)
- b++;
+ if (b->x1 >= b->x2 || b->y1 >= b->y2)
+ continue;
}
- else
- b++;
+ b++;
n++;
}
radeon->sarea->nbox = n;
+ if (!n)
+ continue;
+
ret = drmCommandNone(radeon->dri.fd, DRM_RADEON_SWAP);
if (ret) {
((r300ContextPtr)radeon)->hw.all_dirty = GL_TRUE;
radeon->swap_count++;
- (*dri_interface->getUST) (&ust);
+ (*psp->systemTime->getUST) (&ust);
if (missed_target) {
radeon->swap_missed_count++;
radeon->swap_missed_ust = ust - radeon->swap_ust;
radeonContextPtr radeon;
GLint ret;
GLboolean missed_target;
+ __DRIscreenPrivate *psp = dPriv->driScreenPriv;
assert(dPriv);
assert(dPriv->driContextPriv);
driWaitForVBlank(dPriv, &missed_target);
if (missed_target) {
radeon->swap_missed_count++;
- (void)(*dri_interface->getUST) (&radeon->swap_missed_ust);
+ (void)(*psp->systemTime->getUST) (&radeon->swap_missed_ust);
}
LOCK_HARDWARE(radeon);
}
radeon->swap_count++;
- (void)(*dri_interface->getUST) (&radeon->swap_ust);
+ (void)(*psp->systemTime->getUST) (&radeon->swap_ust);
driFlipRenderbuffers(radeon->glCtx->WinSysDrawBuffer,
radeon->sarea->pfCurrentPage);