Poor performance

Started by
13 comments, last by Juliean 12 years, 6 months ago
Hi,

I've recently come to a point where my game suddently only ran at 22-26 fps (both debug and release mode) instead of 50(debug) - 179 (release). First of all, I know that measuring fps isnt the best way, but obviously the game isnt running fluently anymore, and its quite a huge drop. Also, given that both debug and release mode make no difference at all anymore, it is quite obvious that the cpu isn't guilty, too. This alone makes my problem seem rather strange, because this is what I've got running on my gpu recently:

- 1 simple cube and one 100k tri skybox (only models in game)
- Hdr tonemapping and atmospheric scattering
- deferred rendering (1 ambient light source)
- Basic postprocessing pipeline (no effects applied)

To be honest, I wasnt satisfied with the performance in first place. But now, I'm totally desperate. What could have gone wrong? I remember a day ago running my game with 60 fps in debug mode, and on the next day it was that slow. I didnt change much in the meanwhile, just playing around with ssao, but resetting my shaders didnt help much.

So, does anyone have some idea what could be wrong? My system is an C2D E8400 and one Geforce 260gtx. More than enough power to handle a simple game! Only thing I did was re-install directx sdk because controll panel wasnt working anymore.. Could this be the cause? Thanks in advance for any ideas!
Advertisement
What DirectX version are you using? Have you enabled the debug layer? Any errors/warnings?

One or some of your shaders is probably causing unnecessary overhead, or your doing something weird on CPU side... Use a profiling tool to see if your either CPU/GPU bound, from there you will know what part of the game is causing the slow down and hopefully you will be able to fix it
I am using DirectX9, and yes, I tried both enabeling/disabling debug mode and debug
output. No errors and no warnings except
of some redundant state changes (which were there since I started using effect files).

As I said, I'm certainly not cpu bound. Debug/release mode doesnt change anything, and so does deactivating my whole game logic. As Im only doing 2 draw calls, cpu is most likely innocent.

The weird thing is, I really dont have any shaders that could cause much overhead. I am drawing only one cube ambient lighted, so this isnt likely the bottleneck, and otherwise.. Atmospheric scattering has been used by me for quite some time without changes and a decent speed, so again, no incident on a bottleneck. Hdr, my last complex shader (all the other just read some texture and output it to the model) doesnt do any complex calculations/other stuff too, so its not very likely, too. I quess I can't say that for sure until I profile, which I can't do until the weekend.. By the way, are there any other gpu profilers other than PIX (which has never been working for me for no reason).

Any more suggestions on what could cause this bottleneck (it definately isnt the cpu)?
nVidia PerfHUD is a great profiler if you have a nVidia GPU. ATI has the GPU PerfStudio but I'm not sure if it supports DirectX 9.
There's also Intel GPA.

In PerfHUD you can see which draw calls are using more CPU/GPU time, when you know which one is maybe you can post your shaders and someone might be able to help you
Implement Frustum Culling to only render what the camera sees :)
@TiegoCosta: I am already using PerfHud, it is really great but the profiling unit isnt working. Ive read something about that I need to use a certain instrumented driver (windows xp). Is this true?

@Daniel_RT: Yes, this is one of the features im going to implent soon, however as I said Im only rendering one cube and a skysphere, so this isnt going to save anything at all. Definately not vertex bound ;)

Some more suggestions about what could be wrong?

@TiegoCosta: I am already using PerfHud, it is really great but the profiling unit isnt working. Ive read something about that I need to use a certain instrumented driver (windows xp). Is this true?


Yes, but when you install PerfHUD, the driver instrumentation is also installed. You just have to run/enable it. Also make sure that your driver is compatible with PerfHUD
Ah, I see. Will the newest nvidia driver be compatible with PerfHUD? Or do I have to install an older driver (please no..)?

Additionally, I forget to menation one thing. On my titlescreen, I also have a highly reduced performance. I used to have around 2000 fps drawing just 5 textured quads and 3 lines of text. Now I only get around 200 fps! So shaders are almost out of question, as I only use a simple shader for Outputting vertex position and the texture for the quads. There is no stuff from the game itself loaded so far, I'm using a nice OO scene design :)

This begins to occur really strange to me. Could it be a software defect of my pc? Though Im not reaching the 60fps mark on my titlescreen, it still takes 10 times longer than before to render everything.. Some more ideas?

Ah, I see. Will the newest nvidia driver be compatible with PerfHUD? Or do I have to install an older driver (please no..)?

I'm not sure... try it using the most recent driver then try this:

XP builds of PerfKit 6.62 include an instrumented version of the 195.62 driver.
[/quote]
Maybe you have to use driver 195.62 on XP... Btw, when you uninstall PerfHUD you have to mannually delete registries entries related to PerfHUD


This begins to occur really strange to me. Could it be a software defect of my pc? Though Im not reaching the 60fps mark on my titlescreen, it still takes 10 times longer than before to render everything.. Some more ideas?

Maybe the driver you have installed has some kind of bug... Try different drivers

Are you running your game on a notebook?? If so, maybe your notebook uses switchable graphics and its running your game on integrated graphics instead of the GPU...

To be honest, I wasnt satisfied with the performance in first place. But now, I'm totally desperate. What could have gone wrong? I remember a day ago running my game with 60 fps in debug mode, and on the next day it was that slow. I didnt change much in the meanwhile, just playing around with ssao, but resetting my shaders didnt help much.



If you are using version control, just update to the previous revision (to make sure it's still 60fps). Then a quick scan over the last couple of commits will immediately highlight the problem.
If you're not using version control, it might be a good time to start using it! (because your only other option is to use a profiler to help identify the hot spots)

This topic is closed to new replies.

Advertisement