Re: Mono or Multi-process ?

New Message Reply Date view Thread view Subject view Author view

Jim Helman (jimh++at++surreal)
Fri, 03 Nov 95 11:44:57 -0800


> Ok, I will use single process, but must I take care about mixing
> graphic and non graphic tasks or not ??? I suppose I should not
> take care about it if the length of the pipeline is big enough to
> avoid my process to wait.

If you ever want to MP, you should keep the graphics calls in
draw callbacks.

The issue of optimal performance on single processor machines is
somewhat complex because the graphics subsystem is usually idle during
the APP stage (and the CULL stage when sorting is enabled or when
using APPCULLDRAW|CULL_DL_DRAW). One important tuning question is
whether your database renders more quickly with sorting turned on. If
sorting is off with APPCULLDRAW, a single CULLDRAW traversal is done,
rendering as it goes. Sorting during the CULL delays the start of
drawing, but often results in shorter drawing times.

Another issue you raise is when should you make GL calls? Because
holding off rendering for APP and maybe CULL can be bad (with even the
screen clear held off), in some cases it might be useful to run with
APPCULL_DRAW even on a single CPU machine and give the DRAW a higher
nondegrading priority so that you don't thrash with CPU context
switches between the two threads (although you might want to
add a lock around pfDraw() to guarantee this).

A significant optimization might be made simply by moving clear to the
beginning of the frame, e.g. rather than calling pfClear() in your
draw callback before pfDraw(), try clearing after swapbuffers in your
pfPipeSwapFunc().

rgds,

-jim helman

jimh++at++surreal.asd.sgi.com
415/390-1151


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:52:00 PDT

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