Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Sun, 04 Apr 1999 21:38:00 -0700
- Phil
> I stumbled across a bug in IRIX 6.5 last week. I think that you
> experience the same bug. Are you running IRIX 6.5 ?
> Assuming you do, the bug is in sginap() call. sginap(1) should sleep for
>
> 10 milisec. On 6.5, it will sleep for 20 !
> Performer uses sginap(1) if you are running on a rate lower than the
> display rate (i.e. running at 30 Hz). After your channel draw function
> is done, it will take the time, and use a couple of sginap(1)s to sleep
> until almost the end of the frame. Then it will call glXSwapBuffers or
> call your swapbuffers callback. The funny thing is - if your scene is
> heavy (i.e. can not run at 60Hz because you draw lots of polygons), you
> will be OK, because Performer will not issue a sginap call. If you scene
>
> is empty, like when you draw one large polygon, it will call sginap(1)
> twice, thinking it sleeps 20 milisec, when in fact it sleeps for 40
> milisec.
> The solution is to run with root priviledges, and with realtime priority
>
> (set with schedctl() or npri). It seems that sginap behaves better in
> that case. However, my tests in that direction were inconclusive, and I
> finnaly decided that it's better to use nanosleep() instead. nanosleep()
>
> sleeps at finer resolution than sginap(), but it also requires realtime
> priority on IRIX 6.5.
> What you should do is define a function in your code :
>
> long sginap (long ticks)
> {
> struct timespec ts;
>
> ts.tv_sec = 0;
> ts.tv_nsec = ticks * 10000;
>
> nanosleep (&ts, 0);
> }
>
> This will override the sginap in libc, and call nanosleep instead. I may
> be wrong about the syntax of nanosleep. You'de better see the man pages.
Vicente Javier Sevilla Peris wrote:
>
> Hello All
>
> In order to isolate problems, I have built an .im file that covers a 20Kmx20km area with only a quad.
>
> This .im file uses a .ct and the .ic files of a 16384x16384 cliptexture.
>
> Running "clipfly myfile.im" the performance is OK, reach a 60 Hz framerate without problems.
>
> Running "clipfly -P 0 -r 30 myfile.im" or running "clipfly -P 1 -r 30 myfile.im" that runs clipfly with PFPHASE_FLOAT and
>
> PFPHASE_LOCK mode and a framerate of 30Hz the performance goes down.
>
> I want fix the framerate to 30Hz. I don't need 60Hz.
>
> It's this possible with clipmaping?
>
> Does anybody know about this problem ?
>
> Thanks.
> _____________________________________________________________________
>
> Javier Sevilla Peris mailto:jsevilla++at++glup.irobot.uv.es
> _______
> / /___\ \
> LISITT / / \ \ R T E C
>
> Phone: +34 6 360 4484
> Dept. Electr. & Informatics Addr: Poligono de la Coma s/n
> University of Valencia Valencia (SPAIN)
>
> _____________________________________________________________________
>
>
-- Phil Keslin <philk++at++engr.sgi.com>
This archive was generated by hypermail 2.0b2 on Sun Apr 04 1999 - 21:38:26 PDT