Re: draw times

New Message Reply Date view Thread view Subject view Author view

Bernard Leclerc (bleclerc++at++cae.ca)
Thu, 30 Jan 1997 13:08:24 -0500


Bryan Wasileski wrote:

> Does any know how to deterministically calculate, in closed form, the
> draw and cull times per viewport (channel) for a Performer app?
> Some would say that deterministic and SGI don't usually go together
> in the same sentence but I need to at least get close. The application I
> have can have anywhere from 1-28 viewports and I need to know how
> to pre-determine the frame rate as a function of the number of channels.

Bryan,

You'll can obtain deterministic results if your application is running
with PFPHASE_LOCK, a non-degrading priority, on restricted and isolated
CPUs. To ensure a valid timing on a per-channel basis, I suggest you use a
DRAW callback similar to this one:

        void drawCB(pfChannel* chan, void* data)
        {
                chan->clear();
                pfDraw();
                glFinish(); // or simply finish() for IrisGL
        }

I've tried this method of timing a channel independently from the others.
It was suggested to me by Sharon Clay. Using this, you'll will obtain the
exact time required to draw a particular channel. However, the overall
throughput of your application may (and will) be reduced because every
channel will block the DRAW process until the graphics pipeline is done
drawing it. You won't benefit from the fact that a channel could start
sending drawing commands to the pipe even if there are still graphics
commands from the previous channel being processed inside the graphics
subsystem.

As for the CULL stage, you might consider using pfMultithread() to avoid
being limited by the culling task when drawing 28 channels (man, that's a
large number of views).

Use pfFrameStats to obtain channel statistics. It is still possible to use
pfChannel::drawStats() to draw the statistics panel inside the channel,
but this will artificially increase the draw time of your channel. It is
best to query the channel statistics from the APP process.

Let us know how you're doing. You have an interesting problem. And I'm
personaly interested with multi-channel applications.

--
Bernard Leclerc			CAE Electronics Ltd., 8585 Cote De Liesse
Technical Leader		Saint-Laurent, Quebec, Canada, H4L-4X4
3-D Graphics Applications	tel: +1 514 341 2000 extension 2275
bleclerc++at++cae.ca			fax: +1 514 340 5496
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

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:54:30 PDT

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