Through development I've been running my 2D game (Monogame 3.6) on my windows laptop, which has some crummy integrated graphics card and an i5. Now I try my game on my gaming PC, which has a GTX 970 and also an i5 (a slightly better one), and the game runs slow as hell.
I'm at a complete and total loss here. Here's what I've tried to speed up the game, and it's still hovering around maybe 15 FPS:
- Reducing the game from 3 or 4 spritebatch blocks to a single one
- Removing ALL shader uniform changes, so that it only sets up the shader uniforms once and never changes them
- Commenting out 100% of particle rendering code.
- Removing my extra render target that I used for post process fx.
After all of this, making it about as simple as a Hello World renderer, and it's still dog slow. I'm dumbfounded. Codetrack profiler says 80% of my cpu time is inside of a function called
DoDraw which seems to be XNA framework code. So I'm sure it's not the update logic, or sheer number of things rendering, etc. The time anything is taking pales in comparison to
DoDraw. The stack looks like this:
But I don't really understand what it's doing and why it's taking so long. Any tips, knowledge of rendering quirks, profiling tips, etc, anything appreciated.