[PATCH 08/12] DRI2: handle target_msc of 0 case

Ian Romanick idr at freedesktop.org
Mon Mar 22 15:30:57 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesse Barnes wrote:
> An OML swap can have a 0 target_msc, which just means it needs to satisfy
> the divisor/remainder equation.  Pass this down to the driver as needed
> so we can support it.
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
>  hw/xfree86/dri2/dri2.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index eb61526..9825a55 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -647,13 +647,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
>  	 */
>  	*swap_target = pPriv->last_swap_target + pPriv->swap_interval;
>      } else {
> -	/* glXSwapBuffersMscOML() call with target_msc, divisor, remainder set.
> -	 * Just make sure that target_msc is not earlier than last swap target +
> -	 * swap interval.
> -	 */
> -	if (target_msc < pPriv->last_swap_target + pPriv->swap_interval)
> -	    target_msc = pPriv->last_swap_target + pPriv->swap_interval;
> -
> +	/* glXSwapBuffersMscOML could have a 0 target_msc, honor it */
>  	*swap_target = target_msc;
>      }
>  

The undoes part of patch 5.  Maybe patch 5 could just be fixed?  Does
this provide the correct behavior if (target_msc != 0) && (target_msc <
pPriv->last_swap_target + pPriv->swap_interval)?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkun76AACgkQX1gOwKyEAw9eJQCfZm31rxLIyTeQImYF932Xf5gX
Z8cAoJrdxXBYWNkdpvCJc63KrWgTOpVP
=MWHK
-----END PGP SIGNATURE-----


More information about the xorg-devel mailing list