On Fri, 2007-10-26 at 10:59 -0700, Jesse Barnes wrote: > > diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c > index 707e398..25eaccc 100644 > --- a/src/glx/x11/glxcmds.c > +++ b/src/glx/x11/glxcmds.c > @@ -2919,8 +2928,10 @@ int __glXGetInternalVersion(void) > * any DRI driver built to any previous version. > * 20060314 - Added support for GLX_MESA_copy_sub_buffer. > * 20070105 - Added support for damage reporting. > + * 20070925 - Added support for per-drawable getMSC callbacks, which > + * allows the core to support vblank events on multiple pipes. > */ > - return 20070105; > + return 20070925; > }
So is this still necessary/useful? > diff --git a/src/mesa/drivers/dri/common/dri_util.h > b/src/mesa/drivers/dri/common/dri_util.h > index 91992a9..74b54a5 100644 > --- a/src/mesa/drivers/dri/common/dri_util.h > +++ b/src/mesa/drivers/dri/common/dri_util.h > @@ -318,6 +326,32 @@ struct __DRIdrawablePrivateRec { > /[EMAIL PROTECTED]/ > > /** > + * \name Vertical blank tracking information > + * Used for waiting on vertical blank events. > + */ > + /[EMAIL PROTECTED]/ > + unsigned int vblSeq; > + unsigned int vblFlags; > + /[EMAIL PROTECTED]/ > + > + /** > + * \name Monotonic MSC tracking > + * > + * Low level driver is responsible for updating msc_base and > + * vblSeq values so that higher level code can calculate > + * a new msc value or msc target for a WaitMSC call. The new value > + * will be: > + * msc = msc_base + get_vblank_count(primary) - vblank_base; This should probably say something other than 'primary' now. > @@ -131,8 +180,10 @@ int driWaitForMSC32( __DRIdrawablePrivate *priv, > return GLX_BAD_CONTEXT; > } > > + *msc = vblank_to_msc(priv, vbl.reply.sequence); > + > dont_wait = 0; > - if (target_msc != 0 && vbl.reply.sequence == target) > + if (target_msc != 0 && *msc == target) Shouldn't the latter be something like *msc == target_msc now? > diff --git a/src/mesa/drivers/dri/i915/intel_buffers.c > b/src/mesa/drivers/dri/i915/intel_buffers.c > index 46a67b1..67ea226 100644 > --- a/src/mesa/drivers/dri/i915/intel_buffers.c > +++ b/src/mesa/drivers/dri/i915/intel_buffers.c > > + /* > + * Update msc_base from old pipe > + */ > + driDrawableGetMSC32(dPriv->driScreenPriv, dPriv, &count); > + dPriv->msc_base = count; > + /* > + * Then get new vblank_base and vblSeq values > + */ > + dPriv->vblFlags = flags; > + driGetCurrentVBlank(dPriv, dPriv->vblFlags, &dPriv->vblSeq); > + dPriv->vblank_base = dPriv->vblSeq; I think this breaks the code following immediately, which waits for pending flips on the old plane (guess I should have commented that...). I'd put the new code around the same place where intel_fb->vblank_flags was updated previously. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel