Continuation...
We didn't use OpenGL or implemented page flipping because we don't want to make 
big modifications on the code in such a very short time. 

Eugene M. Fariñas
Design Engineer
Eazix, Inc.
BSAP, UPLB

-----Original Message-----
From: Eugene Farinas 
Sent: Friday, November 26, 2004 3:58 PM
To: [EMAIL PROTECTED]
Subject: RE: DGA and tearing effects

We're using an AMD gx2 geode processor for our embedded project. I've modified 
the code in order to sync the framebuffer copying with the vertical refresh.

void CAM_APP::DisplayImage_NoPartial(unsigned char* offset)
{
    register int j;
    register unsigned long caddr = (unsigned long) offset;
    unsigned char *buffer = g_bBuf;
    for(j=0; j<iSize; buffer+=2,j++){
      *( (unsigned short*) buffer ) = sTable[g_pBuf[j]];
    }
    gfx_wait_vertical_blank();
    memcpy((void*)offset, (void*)g_bBuf, IMG_SIZE);

}

Where g_bBuf is a temporary buffer, buffer holds the start address of g_bBuf, 
g_pBuf holds the image received from the camera, and gfx_wait_vertical_blank() 
waits for vsync to end. We've greatly minimized the tearing artifacts during 
rendering but the framerate slowed down from 15 to 11 fps. 

Eugene M. Fariñas
Design Engineer
Eazix, Inc.
BSAP, UPLB

-----Original Message-----
From: Mark Vojkovich [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 26, 2004 7:51 AM
To: [EMAIL PROTECTED]
Subject: Re: DGA and tearing effects

  Some OpenGL drivers can do vblank synced flips (NVIDIA's can).
glDrawPixels + glXSwapBuffers should be faster than a DGA implementation.
Even XPutImage should be faster than a DGA implementation, but like
you've pointed out, there's no way to sync XPutImage to vblank.
DGA is frequently broken in drivers so it's good to use something
else.

                        Mark.

On Thu, 25 Nov 2004, James Wright wrote:

>    Isn't DGA mode being phased out? I been using XPutImage and the XVidMode 
> extension to provide fullscreen instead. Only problem being you have no 
> control over when the image is actually copied to the display, so tearing 
> results, unless someone else here would like to enlighten me...
>
>
>
> On Thu, 25 Nov 2004 11:38:17 -0800 (PST)
> Mark Vojkovich <[EMAIL PROTECTED]> wrote:
>
> >    If you want tearless rendering you should be flipping.  Ie. render
> > to a non displayed portion of the framebuffer, then call XDGASetViewport
> > to display it after the copy is finished.  See the DGA test apps at
> > http://www.xfree86.org/~mvojkovi/, specifically texture.tar.gz.
> > If the texture and skull demos aren't tearless, there is a bug in the
> > DGA driver support for your card.
> >
> >
> >                     Mark.
> >
> > On Thu, 25 Nov 2004, Eugene Farinas wrote:
> >
> > > Hi guys! We're developing a DGA program that render full screen at 
> > > 1280x1024 16 bpp 15fps the video image read from a sony camera, but we're 
> > > experiencing tearing artifacts during rendering. This is a part of the 
> > > code that copies the data to the frame buffer:
> > >
> > > void CAM_APP::DisplayImage_NoPartial(unsigned char* offset)
> > > {
> > >   register int j;
> > >   register unsigned long caddr = (unsigned long) offset;
> > >       for(j=0; j<iSize; caddr+=2,j++){
> > >       *( (unsigned short*) caddr ) = sTable[g_pBuf[j]];
> > >       }
> > > }
> > >
> > > Where the offset is the start of the buffer destination, and g_pBuf is 
> > > the data captured from the camera. we've tried copying the data during 
> > > vertical resync but we're still experiencing tearing on the image. We're 
> > > using an AMD gx2 geode processor w/ 128 mb ram and 8mb vram. I would like 
> > > to ask your help in removing the tearing artifacts. Thanks.
> > >
> > > ---
> > > 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
> >
> _______________________________________________
> 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

---
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

Reply via email to