glUniformMatrix4fv slow
Posted: Sun Jun 10, 2012 9:12 pm
Done a small test, 100 box's drawn at the same place only taking up a small about of the screen. So not fill rate or vertex limited. Drawing all 100 with one call glUniformMatrix4fv is a lot quicker than calling glUniformMatrix4fv before each draw, which will be the norm for a game. The matrix is the same each time. The only difference is the call to glUniformMatrix4fv.
Tomorrow evening I'll put some numbers together to get a handle on this but I did not expect glUniformMatrix4fv to have caused a slowdown. I wonder if this code is stalling waiting for the GPU to finish. But the hit with 100 calls to glUniformMatrix4fv is not looking good. To put this into perspective, on the old Xbox1 if you wanted 60fps, you were looking at a celling of about 2000 separate draw calls.
Tomorrow evening I'll put some numbers together to get a handle on this but I did not expect glUniformMatrix4fv to have caused a slowdown. I wonder if this code is stalling waiting for the GPU to finish. But the hit with 100 calls to glUniformMatrix4fv is not looking good. To put this into perspective, on the old Xbox1 if you wanted 60fps, you were looking at a celling of about 2000 separate draw calls.