mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 04:10:10 +01:00
Add helper function that returns the current vblank sequence of a drawable.
This commit is contained in:
parent
638ece315f
commit
ebc879014c
2 changed files with 23 additions and 0 deletions
|
|
@ -290,6 +290,27 @@ driGetVBlankInterval( const __DRIdrawablePrivate *priv, GLuint flags )
|
|||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/**
|
||||
* Returns the current vertical blank sequence number of the given drawable.
|
||||
*/
|
||||
|
||||
void
|
||||
driGetCurrentVBlank( const __DRIdrawablePrivate *priv, GLuint flags,
|
||||
GLuint *vbl_seq )
|
||||
{
|
||||
drmVBlank vbl;
|
||||
|
||||
vbl.request.type = DRM_VBLANK_RELATIVE;
|
||||
if ( flags & VBLANK_FLAG_SECONDARY ) {
|
||||
vbl.request.type |= DRM_VBLANK_SECONDARY;
|
||||
}
|
||||
vbl.request.sequence = 0;
|
||||
|
||||
(void) do_wait( &vbl, vbl_seq, priv->driScreenPriv->fd );
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/**
|
||||
* Waits for the vertical blank for use with glXSwapBuffers.
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ extern void driDrawableInitVBlank ( __DRIdrawablePrivate *priv, GLuint flags,
|
|||
GLuint *vbl_seq );
|
||||
extern unsigned driGetVBlankInterval( const __DRIdrawablePrivate *priv,
|
||||
GLuint flags );
|
||||
extern void driGetCurrentVBlank( const __DRIdrawablePrivate *priv,
|
||||
GLuint flags, GLuint *vbl_seq );
|
||||
extern int driWaitForVBlank( const __DRIdrawablePrivate *priv,
|
||||
GLuint * vbl_seq, GLuint flags, GLboolean * missed_deadline );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue