On Mon, 2009-04-20 at 18:13 +0200, Olaf Ruppert wrote:
> On Mon, Apr 20, 2009 at 4:41 PM, Olaf Ruppert
> >> I believe they turn off interrupts on vblank to save power.
>
> O.K. I checked that. I get the vblank interrupt.
> But it does not help, here is the code:
>
> static void swap(void)
> {
> static char * device = "/dev/dri/card0";
> static int fd = 0;
> drm_wait_vblank_t blank;
> int r = -1;
>
> if (!fd) {
> fd = open(device, O_RDWR);
> if (fd < 0)
> die ("dri: Could not open device");
> }
>
> blank.request.type = _DRM_VBLANK_RELATIVE;
> blank.request.sequence = 1;
>
> do {
> r = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, &blank);
> blank.request.type &= ~_DRM_VBLANK_RELATIVE;
> } while (r && errno == EINTR);
>
> if (r)
> die("vsync failed");
>
> glXSwapBuffers(dpy,stage);
> }If you're doing GL, why aren't you just using GLX_SGI_video_sync? -- Eric Anholt [email protected] [email protected]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
