Out of interest what method are you using to wait for the vblank in DGA? To 
vsync properly in DGA I have been having to perform a page flip (asking for it 
to be done next retrace), then waiting for this operation to complete;

 
   XDGASetViewport(Xdisplay, Xscreen, 0, Xdga.db * Xdga.height, 
XDGAFlipRetrace);

   while (XDGAGetViewportStatus(Xdisplay, Xscreen)); 



   Would like to compare various methods to see if this is the way to go... 
Note that Xdga.db toggles between "0" and "1" every frame flip, to enable 
proper page flipping, as we always copy to the hidden page, then use the above 
code to flip and wait.


Thanks,
James




On Sun, 28 Nov 2004 13:21:18 +0800
"Eugene Farinas" <[EMAIL PROTECTED]> wrote:

> Thanks for your help guys! I've managed to remove the tearing on our DGA 
> program but the consequence is that the rendering speed went from a max of 15 
> fps (w/o vsync) to 9 fps (w/ vsync). Initially, the image reading from the 
> camera and the copying to the framebuffer was in a single thread (w/c was 
> still displaying tearing artifacts even with vsync), but now I've separated 
> them into two threads, one thread reads the image from the camera, and the 
> other writes to the framebuffer. The read thread reads the image from the 
> camera, does some image manipulation on the image (converts 8-bit image to 
> 16-bit), and copies the image on a temporary buffer.  The write thread copies 
> the temporary buffer to the framebuffer by using memcpy. My task now is to 
> move up the fps to a respectable 13 to 14 fps max. 
>                        
> 
> Eugene M. Fariñas
> Design Engineer,
> Eazix, Inc.
> B.S. Applied Physics, 
> UPLB
> -----Original Message-----
> From: Mark Vojkovich [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, November 28, 2004 6:23 AM
> To: [EMAIL PROTECTED]
> Subject: Re: DGA and tearing effects
> 
> On Sat, 27 Nov 2004, James Wright wrote:
> 
> >    My understanding is that flat panels do not "scan" a screen as a CRT 
> > does, so there is no vertcial blank period to perform a page flip. They do 
> > have a refresh rate of usually around 60Hz, but his is simply how aften the 
> > pixels are able to switch states, or how often the display is refreshed 
> > from the panels backbuffer. In a DGA mode if you try waiting for a vblank 
> > with a flat panel, then the page flip is performed immediately, instead of 
> > waiting for anything. The panels own circuits decide when to change the 
> > display anyway, so anything you try to do yourself is moot. If I am 
> > incorrect, then I apologise...
> >
> 
> 
>     That's sortof the correct idea for when using the panel's VGA
> interface.  For the VGA interface, the panel is not necessarily
> refreshing at the rate coming through the VGA connector.  For DVI,
> the panel is refreshing at the rate coming through the DVI connector,
> but this doesn't necessarily correspond to the timings programmed
> in the VGA registers.  At least on the hardware I've worked on,
> the VGA timing merely correspond to the input to the flat panel
> scaler in the graphics chip, not the output going to the panel.
> 
> 
>                       Mark.
> 
> >
> >
> > On Sat, 27 Nov 2004 13:37:01 -0500
> > Michel Dänzer <[EMAIL PROTECTED]> wrote:
> >
> > > On Sat, 2004-11-27 at 16:40 +0000, James Wright wrote:
> > > >    About a year ago I was using DGA for my games graphics library. I
> > > > was told by various people that using DGA was not the way to go. At
> > > > first I thought this was nonsense, as you can't get vsync using the
> > > > more standard XPutImage method (and get tearing). However, all changed
> > > > when I bought a laptop with TFT screen. Problem is, there is no vsync
> > > > on the new LCD/TFT monitors!
> > >
> > > There is in my experience, at least if you use the panel's native mode.
> > >
> > >
> > > --
> > > Earthling Michel Dänzer      |     Debian (powerpc), X and DRI developer
> > > Libre software enthusiast    |   http://svcs.affero.net/rm.php?r=daenzer
> > >
> > > _______________________________________________
> > > Devel mailing list
> > > [EMAIL PROTECTED]
> > > http://XFree86.Org/mailman/listinfo/devel
> > >
> >
> > _______________________________________________
> > Devel mailing list
> > [EMAIL PROTECTED]
> > http://XFree86.Org/mailman/listinfo/devel
> >
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.797 / Virus Database: 541 - Release Date: 11/15/2004
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.797 / Virus Database: 541 - Release Date: 11/15/2004
>  
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
> 

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to