Marcus Barnes (marcus++at++multigen.com)
Fri, 23 Aug 1996 12:11:20 -0700
There are two distinct implementations shown in the 2.0.2 asdfly demo in
pfuterrain.c . They both use a pfSwitch to control double buffering.
The method of scape[App|Cull]() uses APP and CULL to evaluate the mesh, each
doing 50%, then the CULL toggles the pfSwitch. The data is contained in
pfCycleBuffer's. This was the first algorithm developed (last year) that
distributed the work load but doesn't scale very well.
The method of scapeMult[App|Cull]() is the one you're talking about. It uses a
time slice approach where the APP is given 4 frames to evaluate the mesh. The
CULL just counts frames and toggles the pfSwitch. It waits 5 frames first, to
let the APP build the first mesh. This approach does not use pfCycleBuffer's.
This was the second algorithm developed and is a bit more scalable but
introduces more latency.
> It appeared to me it would have problems in multiprocess mode.
[munch analysis]
> I am more puzzled because the sample code works...
It works because the APP is working on the "tl->active" buffer for 4 frames.
It only switches it when it's done. The CULL controls the pfSwitch based upon
"tl->active" which toggles every 4 frames. So the "double buffer" is toggled
every four frames as well.
> I thought the triple buffers should be used here in accordance to the three
> phase APP_CULL_DRAW, while double buffers would not be sufficient for the
> three process stages.
In the pfCycleBuffer method there are several such buffers. In the time slice
method, the CULL and DRAW can be viewed as a single stage. In all cases, the
terrain evaluation process implicitly includes culling. The CULL stage has
nothing to do in this regard.
Regards.
--
____ ___ ____ _ Marcus Barnes, Member Technical Staff
/ __ `__ \/ __ `( ) MultiGen Inc. 550 S. Winchester Blvd. STE 500
/ / / / / / /_/ / / San Jose CA 95128 WEB: http://www.multigen.com
/_/ /_/ /_/\__, /_/ PH:1-408-556-2654 FX:1-408-261-4102
/____/ EMAIL: marcus++at++multigen.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:24 PDT