There have been quite a few posts about low frame rates with AMD cards. I've got one around and thought to have a look.
In the start region I am getting 45-75 fps on my system (Win7x64).
Running the game in gDEBugger I see about 55fps.
Looking at call counts, there are a bit more than 1000 draw calls per frame, so OpenMW doesn't seem to be draw call limited. Disabling all draw calls increases the framerate to 65fps.
The biggest call counts go to glLightfv 1820(1156 effective calls) and glLightf 1575(320 effective calls). It is possible to disable fixed function lighting, which increases the framerate to 60fps. Although gDEBugger doesn't remove the now completely redundant glLight calls, so no idea how much overhead they are causing.
There are also 3 glGetError calls per frame. Those can stall the GPU. Unfortunately I can't disable them to see how much effect they have.
So the game seems to be CPU limited in general.
To anyone seeing large fps drops with AMD, feel free to share your savegames (assuming vanilla configuration). Maybe we can figure out together what is going on.
AMD OpenGL performance
Re: AMD OpenGL performance
To disable glGetError checking you set the environment variable OSG_GL_ERROR_CHECKING=OFF.
Re: AMD OpenGL performance
OSG_GL_ERROR_CHECKING=OFF doesn't seem to work in conjunction with gDEBugger, might be a gDEBugger issue though. Would be nice if the debugger allowed to skip certain call types, but oh well...
Is there eventually a simple way to disable lighting setup from the engine side, just to see how it performs without all those glLight calls?
Is there eventually a simple way to disable lighting setup from the engine side, just to see how it performs without all those glLight calls?
Re: AMD OpenGL performance
You can set environment variables within gdebugger in the project's "Debug settings". These may override environment variables you have set in the OS.OSG_GL_ERROR_CHECKING=OFF doesn't seem to work in conjunction with gDEBugger, might be a gDEBugger issue though. Would be nice if the debugger allowed to skip certain call types, but oh well...
You'd need to recompile the engine.Is there eventually a simple way to disable lighting setup from the engine side, just to see how it performs without all those glLight calls?
Code: Select all
diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp
index c237f23..12d326e 100644
--- a/apps/openmw/mwrender/renderingmanager.cpp
+++ b/apps/openmw/mwrender/renderingmanager.cpp
@@ -243,7 +243,7 @@ namespace MWRender
mViewer->getCamera()->setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR);
mViewer->getCamera()->setCullingMode(cullingMode);
- mViewer->getCamera()->setCullMask(~(Mask_UpdateVisitor|Mask_SimpleWater));
+ mViewer->getCamera()->setCullMask(~(Mask_UpdateVisitor|Mask_SimpleWater|Mask_Lighting));
mNearClip = Settings::Manager::getFloat("near clip", "Camera");
mViewDistance = Settings::Manager::getFloat("viewing distance", "Camera");
Re: AMD OpenGL performance
That was the first option I've tried.scrawl wrote:You can set environment variables within gdebugger in the project's "Debug settings". These may override environment variables you have set in the OS.
I was afraid I'd haveYou'd need to recompile the engine.