On Wed, 2007-09-26 at 11:41 -0700, Jesse Barnes wrote:
> 
> I'm not sure about the compatibility implications of these changes, it
> seems like touching __DRIdrawableRec and __DriverAPIRec may affect
> binary compatibility with existing drivers, is there anything else?
> 
> If compatibility isn't a concern, I can go ahead and remove the
> per-screen getMSC altogether, along with its associated __DriverAPI
> function pointers and remove some code.

dri_interface.h defines the interface between the loader (libGL or
AIGLX) and the driver (*_dri.so). So you can't remove anything there and
can only add stuff at the end in order to remain backwards compatible.

__DriverAPIRec is internal to the driver AFAICT.


> diff --git a/src/mesa/drivers/dri/common/dri_util.c 
> b/src/mesa/drivers/dri/common/dri_util.c
> index c30e66f..4a4296e 100644
> --- a/src/mesa/drivers/dri/common/dri_util.c
> +++ b/src/mesa/drivers/dri/common/dri_util.c
> @@ -663,6 +674,7 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
>      pdraw->swapBuffersMSC = driSwapBuffersMSC;
>      pdraw->frameTracking = NULL;
>      pdraw->queryFrameTracking = driQueryFrameTracking;
> +    pdraw->getMSC = driDrawableGetMSC;

I think this needs guarding with

     if (driCompareGLXAPIVersion (20070925) >= 0)

or a new driver will scribble past the end of __DRIdrawableRec with an old 
loader.

You'll need to actually bump the API version as well though. :)


> diff --git a/src/mesa/drivers/dri/common/vblank.c 
> b/src/mesa/drivers/dri/common/vblank.c
> index e7ed545..3974ee6 100644
> --- a/src/mesa/drivers/dri/common/vblank.c
> +++ b/src/mesa/drivers/dri/common/vblank.c
> @@ -50,19 +50,24 @@
>   * currently always returns a \c sequence of type \c unsigned.
>   *
>   * \param priv   Pointer to the DRI screen private struct.
> + * \param drawablePrivate pointer to the DRI drawable private struct
>   * \param count  Storage to hold MSC counter.
>   * \return       Zero is returned on success.  A negative errno value
>   *               is returned on failure.
>   */
> -int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count )
> +int driDrawableGetMSC32( __DRIscreenPrivate * priv,
> +                        __DRIdrawablePrivate * dPriv,

Mismatch between name of the added parameter in comment and code.

>     /* Don't wait for anything.  Just get the current refresh count. */
> -
> +   

Adding whitespace at the end of the line.


> diff --git a/src/mesa/drivers/dri/i965/intel_context.c 
> b/src/mesa/drivers/dri/i965/intel_context.c
> index 1fbf571..05a9aec 100644
> --- a/src/mesa/drivers/dri/i965/intel_context.c
> +++ b/src/mesa/drivers/dri/i965/intel_context.c
> @@ -582,8 +583,9 @@ GLboolean intelMakeCurrent(__DRIcontextPrivate 
> *driContextPriv,
>  
>        if ( intel->driDrawable != driDrawPriv ) {
>          /* Shouldn't the readbuffer be stored also? */
> -        driDrawableInitVBlank( driDrawPriv, intel->vblank_flags,
> -                     &intel->vbl_seq );
> +         driDrawableInitVBlank( driDrawPriv,
> +                                driDrawPriv->vblFlags,
> +                                &driDrawPriv->vblSeq);

driDrawableInitVBlank could take just driDrawPriv as a parameter now?

>          intel->driDrawable = driDrawPriv;
>          intelWindowMoved( intel );

This isn't new with your changes, but we should probably call
intelWindowMoved before driDrawableInitVBlank, to make sure
VBLANK_FLAG_SECONDARY is set for the latter when necessary.

Can you make the corresponding changes to the i915 driver as well?


Looking good overall, thanks for working on this!


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to