Performance problem: glViewport() called every dra

New Message Reply Date view Thread view Subject view Author view

Moshe Nissim (moshe++at++orad.co.il)
Tue, 06 Oct 1998 11:33:42 +0300


Hi All,

I posted the following more than a week ago, but still no reply...

Anybody at SGI looking into this?

Thanks & Bye,
Moshe

-------------------------------------------------------------------------------------------

I came across the following when trying to investigate the strangely slow
performance of Performer on an empty scene graph.

Starting with par -r (process activity tracing), I saw that the X-server (Xsgi)
is context-switching at 100 Hz , when perfly is running at 50 Hz.

By forcing socket communication between perfly and Xsgi (setenv DISPLAY unix:0)
I could dbx perfly and break in write() to see what causes Xlib calls that go to
the server. (normal setenv DISPLAY :0 uses shared-memory transport, so write()
is not called).

It turns out that glViewport() is being called once EVERY draw cycle
by pfChannel::pf_applyView(). This happens in 2.1 and in 2.2.
glViewport() itself calls both XGetGeometry() and XTranslateCoordinates(),
which cause two server round-trips.
(the dbx stack traces are attached)

[ This is actually OpenGL implementation dependent. The only exception I found
was 6.2 on Onyx1, where glViewport() DOESN'T call these functions. ]

So the question is two-fold

1. Why is Performer calling glViewport() every pfFrame(), when there was no real change
(neither by pfChannel::setViewport of pfChanViewport(), nor window-manager event
of window size/position change)
2. Why is OpenGL accessing the X-server for every glViewport() call.

--
  Moshe Nissim,   Orad Hi-Tec Systems
  Tel: (972) - 9 - 7676862 (ext. 579)
  Fax: (972) - 9 - 7676861
  Email: moshe++at++orad.co.il

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Oct 06 1998 - 02:34:03 PDT

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