Re: double buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 24 Mar 2006, Florent Monnier wrote:

> > > >    You can render to a pixmap and then copy the contents of the
> > > > pixmap to the window with XCopyArea().
> ...
> > > It works, but there is a big big loss of performence !
> > >
> > > Without double buffer the frame rate can be for a test example
> > >   380 frames per seconds,
> > > but with double-buffer it slows a lot down to
> > >   30 frames / seconds.
> >
> >    That sounds like the pixmap didn't get put in videoram, which
> > is unfortunate.  It probably would have been fast if the pixmap
> > was in videoram.  Does this card have very much videoram?
>
> My video card is a nVidia  GeForce4 Ti 4200 with AGP8X
>
> > If you VT switch to the console and then back to X (to clear out
> > the existing videoram pixmaps) before starting your app does it
> > run significantly faster?
>
> Not at all.
> It is still very slow in the same way.

   I'm not sure why it's doing that.  If the pixmap was in videoram,
for the worst case (if it were framebuffer bandwidth limited), I would
expect double buffered to be 1/3 the speed of single buffered.

   The only reasons I can think of why it wouldn't go into videoram
are:

1) Not enough videoram (seems unlikely with that card just after a VT
   switch).
2) It's a shared memory pixmap rather than regular pixmap created with
   XCreatePixmap.
3) You're doing more than just rendering to the pixmap and copying
   into the window.


   I have a old demo app which does something similar.
http://www.xfree86.org/~mvojkovi/skull.tar.gz

Don't run the DGA version (DGA is mostely obsolete).  Run the
X11 version ("make skull_X").



	Mark.
_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux