Re: Swapbuffer control problems in multipipe mode

New Message Reply Date view Thread view Subject view Author view

Brian Furtaw (brian++at++hotsauce.clubfed.sgi.com)
Thu, 14 Sep 1995 07:21:09 -0700


On Sep 12, 12:25pm, reiners++at++igd.fhg.de wrote:
> Subject: Re: Swapbuffer control problems in multipipe mode
>
>
> Rob Jenkins wrote:
> >
> >
> > 6) Software Modifications
> > -------------------------
> >
> > To modify an existing program to use the GangDraw mechanism is quite
> > easy. You change existing calls to swapbuffers() or mswapbuffers() to
> > include the GANGDRAW parameter.
> >
> > First, change all instances of
> >
> > swapbuffers();
> >
> > to
> >
> > mswapbuffers(NORMALDRAW);
> >
> > which are exactly equivilent statements. Next, whenever you want to
> > have a synchronized swap (i.e. all pipes swap simultaneously), add
> > the GANGDRAW parameter to the mswapbuffers call; e.g. change
> >
> > mswapbuffers(NORMALDRAW);
> >
> > to
> >
> > mswapbuffers(NORMALDRAW | GANGDRAW);
> >
> >-- End of excerpt from Rob Jenkins
>
> Hmm, as I'm using OpenGL (because I couldn't use IRIS GL GLX on multiple
pipes)
> I can't use mswapbuffers.
>
> Is there an OpenGL replacement for mswapbuffers? Maybe in a new feature patch
> or
> in IRIX 6.2? Any hints?
>
> I don't need it very badly as my software synchronisation with genlocked
pipes
> works ok, but sometimes there are frames that have problems, and GANGDRAW
would
> be a nice and easy way to get rid of them.
>
> Thanks
>
> Dirk
>-- End of excerpt from reiners++at++igd.fhg.de

Dirk,

Try this to get you by until a permanent solution comes out with 6.2.

        Create some semaphores:
                usptr_t* arena = usinit("/usr/tmp/swap_arena");
                usema_t* pipe0ready = usnewsema(arena, 0);
                usema_t* pipe1ready = usnewsema(arena, 0);

        After the process for pipe 0 finishes its frame, it signals
        its completion and waits for pipe1. When pipe1 is also
        ready, pipe0 swaps:

                usvsema(pipe0ready);
                uspsema(pipe1ready);
                glXSwapBuffers(dpy, drawable);

        The process for pipe 1 does the converse:

                usvsema(pipe1ready);
                uspsema(pipe0ready);
                glXSwapBuffers(dpy, drawable);

It's not perfect synchronization but it will disallow one of the pipes to
proceed with swapping unless the other pipe is also ready to swap. This should
work for you.

Brian

-- 
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o

Brian Furtaw (brian++at++sgi.com) RSE Graphics/Communications Office: (301) 572-3293 Silver Spring, MD Fax: (301) 572-3280


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:53 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.