Extremly bad performace on OSX


Me and a friend has been developing a 3D engine over the last few months. Mostly on windows, but tesing on OSX and Linux once in a while. On the PC everything works fine. The game runs quite fine on old hardware like a radeon 9000.

Running on OSX (800 MHz iBook, radeon 9200) is another matter: it runs so slow. Just above 1 fps for a scene that would hit over 50 on my friends PC laptop with comparable spec.

I recently moved all rendering from vertex arrays to VBO:s thinking it would help, but no. It seems like all (over 76%) time in the app is spent inside ATIRadeon8500::submit_buffer (profiled with shark). So it seems like we are GPU-limited. Any tips on what I can do? Other opengl apps like Quake3 runs fine.

Are you using CGL ? AGL ? GLUT ? NSOpenGL ?
Are you calling glFlush or glFinish ? Thoses must be avoided ?
Are you running the correct renderer (check GL_RENDERER) ? etc…

We are using SDL for pretty much everything, GL_RENDERER is ATI Radeon 9200 OpenGL Engine.

No Finish or Flush in the code, it seems like the driver lock the thread and waits very long before returning.

Can it be a problem with stencil/depth bits? We have 24bpp depth and 8 bits stencil.

EDIT: It seems like I don’t have accelerated stencil, can this be helped in any way?

Stencil is ‘accelerated’ on Radeon 9200, so it is not that.
Did you tried on MacOS 10.3.9 ?

No, I only have 10.4.2. Stencil should be accelerated, but running without the stencil render code (a single room in the scene in my case) makes the program fast again. It surly looks lika stencil related problem.

Yes, probably. But stencil works fine, even on my Geforce4MX on MacOSX (with shadows program and stencil mirroring). Try also on a more recent hardware (Like Radeon 9800 or something). See if it helps.

I’ve used stencil recently on 9000-class hardware without performance problems… does the OpenGL profiler tell you anything more than shark does?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.