VRetrace Sync

James Wright james at jigsawdezign.com
Mon Feb 20 10:24:48 PST 2006


  The Sync Extension looks like what I need to use assuming the vertical retrace counter is implemented in the near future in server and drivers! 

  Roughly, how do you go about utilising it, i assume my app would do something like;

1) draw frame in an XImage
2) wait for the Sync v.retrace counter to increment
3) send frame with XShmPutImage() and then XFlush()

  If thats correct is it possible to avoid the busy-wait for the Sync counter? 

  I hope we can get this implemented in the server and drivers at some point as the lack of syncronisation has bothered me for sometime with X11 as it makes any full window scrolling look pretty bad (IMHO). 


Thanks,
James



On Sat, 18 Feb 2006 22:02:02 -0500
Jim Gettys <jg at freedesktop.org> wrote:

> In fact, this, with a lot more was tried, and worked fine, at the time
> we designed Sync (over 10 years ago).  We implemented and tested all
> this stuff when Sync was designed.
> 
> Besides vertical retrace as a Sync counter, the intent is to also hook
> up the sample clocks of any audio hardware as well; this then allows for
> dead on audio/video synchronization.
> 
> So please do the tiny amount of code to hook this up....
> 			Regards,
> 				- Jim
> 
> 
> So please, please, do the hook up.
> 
> > 
> > On Saturday 18 February 2006 05:23, James Wright wrote:
> > >    I hope this is the correct mailing list to post this question to,
> > if not
> > > please advise where it should go!
> > >
> > >    Does anyone know if/when X11 will be extended to allow 2d drawing
> > to be
> > > syncronised to the monitors vertical refresh. I already draw to a
> > > backbuffer first and use XShmPutImage() to copy to the window, so
> > > flickering is not a problem, but still get tearing/shearing which is
> > > especially noticable when scrolling large areas.  I understand that
> > this
> > > also requires the event to be exposed in the kernel, but I thought i
> > had
> > > read that had been done...?
> > 
> > The kernel notification basically already exists for drivers using the
> > DRM.  
> > Exposing this to client applications is a Small Matter of hooking the 
> > vertical retrace up to a counter in the Sync extension.
> > 
> > Note that as we move towards using compositing managers everywhere,
> > the 
> > question for all the other apps besides the compmgr is not "how do I
> > get my 
> > bits on the screen during the retrace" but "how do I notify the
> > compmgr that 
> > my front buffer contains a complete frame".  The Sync extension
> > appears to be 
> > flexible enough to handle this, but no one has tried it yet.
> > 
> > - ajax
> > 
> 
> _______________________________________________
> xorg-arch mailing list
> xorg-arch at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-arch
> 


More information about the xorg-arch mailing list