diff options
author | Michel Dänzer <[email protected]> | 2006-09-28 14:03:41 +0000 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2006-09-28 14:03:41 +0000 |
commit | 7539fde334d3164bc9d33cdabac9c5741d61d012 (patch) | |
tree | bf299d4e3d1d760d69f0e470fb9a21e3675efc71 /src/mesa/drivers/dri/common/vblank.c | |
parent | 6a2f5c6752213cea67b142727eba9e0900952346 (diff) |
driWaitForVBlank: Add support for secondary vertical blank.
Diffstat (limited to 'src/mesa/drivers/dri/common/vblank.c')
-rw-r--r-- | src/mesa/drivers/dri/common/vblank.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/vblank.c b/src/mesa/drivers/dri/common/vblank.c index c7c7b8296ec..2ec3c12353a 100644 --- a/src/mesa/drivers/dri/common/vblank.c +++ b/src/mesa/drivers/dri/common/vblank.c @@ -326,9 +326,12 @@ driWaitForVBlank( const __DRIdrawablePrivate *priv, GLuint * vbl_seq, deadline = original_seq + interval; - vbl.request.sequence = ((flags & VBLANK_FLAG_SYNC) != 0) ? 1 : 0; vbl.request.type = DRM_VBLANK_RELATIVE; - + if ( flags & VBLANK_FLAG_SECONDARY ) { + vbl.request.type |= DRM_VBLANK_SECONDARY; + } + vbl.request.sequence = ((flags & VBLANK_FLAG_SYNC) != 0) ? 1 : 0; + if ( do_wait( & vbl, vbl_seq, priv->driScreenPriv->fd ) != 0 ) { return -1; } @@ -343,6 +346,9 @@ driWaitForVBlank( const __DRIdrawablePrivate *priv, GLuint * vbl_seq, /* Wait until the target vertical blank. */ vbl.request.type = DRM_VBLANK_ABSOLUTE; + if ( flags & VBLANK_FLAG_SECONDARY ) { + vbl.request.type |= DRM_VBLANK_SECONDARY; + } vbl.request.sequence = deadline; if ( do_wait( & vbl, vbl_seq, priv->driScreenPriv->fd ) != 0 ) { |