Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Low framerate during first seconds

$
0
0
Hi gamedev ! I'm facing a really strange performance issue occurring during the first seconds of my app. When launching the app, three scenarios: Some erratic frames at the very beginning, then 70+fps. Some erratic frames at the very beginning, then ~12fps, then, after a few seconds, BAM, 70+fps. Some erratic frames at the very beginning, then stuck at ~12fps. Camera is static, so is the scene. I used nsight to try figure out what's happening, especially in case 2 where I can see what are the differences. When it's rendering at ~12fps, some glDrawRangeElementsBaseVertex/glDrawArrays calls takes a lot of time, some SwapBuffers calls too, and after switching to "cruise speed", those calls are taking a more moderate amount of time: Here is a capture of a nsight session timeline: 1->erratic framerate at the beginning 2->KICKSTART ! 3->stable and high framerate Memory usage is the same in all cases. CPU Usage is a bit higher when stuck at ~12fps, but nothing remarkable. My scene is really simple (only a few cubes), but I use a lot of post process (SSAO, SSR). Reducing the framebuffer size to a smaller one doesn't change anything (although top speed is faster). I also tried to disable all my post process, issue is still there but case 1 is the most common. it is really similar to what's described in this post, although I'm not using vsync at all (double checked code, and also forced vsync off with the nvidia control panel) nor SDL. https://www.opengl.org/discussion_bo...-slow-on-start I also tried to put some glFlush()/glFinish() here and there in my code, without success. A few specifications: OS: Windows 7 CPU: Core I7 6700 GPU: Nvidia 560Ti Drivers: 385.41 I'm stuck with this issue for months now, it's driving me crazy Thanks for any help/advice/question/test to make

Viewing all articles
Browse latest Browse all 17825

Trending Articles