User avatar
RichardUK
Posts: 241
Joined: Fri Jun 01, 2012 5:12 pm

glUniformMatrix4fv slow

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.

User avatar
RichardUK
Posts: 241
Joined: Fri Jun 01, 2012 5:12 pm

Re: glUniformMatrix4fv slow

Mon Jun 11, 2012 7:49 pm

Please see http://www.raspberrypi.org/phpBB3/viewt ... =68&t=8136
glUniformMatrix4fv is fine, I now think it is glGetError that is slow.

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: glUniformMatrix4fv slow

Sun Jul 15, 2012 9:25 am

All Get... calls are slow as they have to wait for the OpenGL command buffers to empty.

Return to “OpenGLES”