Just captured a GL trace (vdrift) under ubuntu12.4/xorg-edgers and win7/catalyst12.4 and retraced with glretrace -p.
It looks like the gl calls might have a "somewhat" lower overhead on linux. Buffer swapping and flushing(where all the exciting stuff happens I guess) is killing the mesa driver.
24 vs 433 usec that's almost a factor of 20 in this snippet...
Another thing I've learned is that trying to profile from user side is completely pointless.
It looks like the gl calls might have a "somewhat" lower overhead on linux. Buffer swapping and flushing(where all the exciting stuff happens I guess) is killing the mesa driver.
Code:
windows 3960396 [0 usec] glEnableClientState(array = GL_VERTEX_ARRAY) 3960397 [0 usec] glEnableClientState(array = GL_TEXTURE_COORD_ARRAY) 3960398 [0.392849 usec] glTexCoordPointer(size = 2, type = GL_FLOAT, stride = 0, pointer = blob(224)) 3960399 [0 usec] glVertexPointer(size = 3, type = GL_FLOAT, stride = 0, pointer = blob(336)) 3960400 [0.785698 usec] glDrawElements(mode = GL_TRIANGLES, count = 42, type = GL_UNSIGNED_INT, indices = blob(168)) 3960401 [0.392849 usec] glDisableClientState(array = GL_TEXTURE_COORD_ARRAY) 3960402 [0.392849 usec] glDisableClientState(array = GL_NORMAL_ARRAY) 3960403 [0.392849 usec] glDisableClientState(array = GL_VERTEX_ARRAY) 3960404 [15.714 usec] glActiveTexture(texture = GL_TEXTURE0) 3960405 [1.5714 usec] glBindTexture(target = GL_TEXTURE_2D, texture = 12) 3960406 [0 usec] glEnableClientState(array = GL_VERTEX_ARRAY) 3960407 [0.392849 usec] glEnableClientState(array = GL_TEXTURE_COORD_ARRAY) 3960408 [0.392849 usec] glTexCoordPointer(size = 2, type = GL_FLOAT, stride = 0, pointer = blob(32)) 3960409 [0 usec] glVertexPointer(size = 3, type = GL_FLOAT, stride = 0, pointer = blob(48)) 3960410 [1.96425 usec] glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_INT, indices = blob(24)) 3960634 [23.5709 usec] wglSwapBuffers(hdc = 0x7c010395) = true linux 1505427 [0.112 usec] glEnableClientState(array = GL_VERTEX_ARRAY) 1505428 [0.109 usec] glEnableClientState(array = GL_TEXTURE_COORD_ARRAY) 1505429 [0.305 usec] glTexCoordPointer(size = 2, type = GL_FLOAT, stride = 0, pointer = blob(224)) 1505430 [0.206 usec] glVertexPointer(size = 3, type = GL_FLOAT, stride = 0, pointer = blob(336)) 1505431 [3.972 usec] glDrawElements(mode = GL_TRIANGLES, count = 42, type = GL_UNSIGNED_INT, indices = blob(168)) 1505432 [0.184 usec] glDisableClientState(array = GL_TEXTURE_COORD_ARRAY) 1505433 [0.103 usec] glDisableClientState(array = GL_NORMAL_ARRAY) 1505434 [0.122 usec] glDisableClientState(array = GL_VERTEX_ARRAY) 1505435 [0.138 usec] glActiveTexture(texture = GL_TEXTURE0) 1505436 [0.445 usec] glBindTexture(target = GL_TEXTURE_2D, texture = 12) 1505437 [0.144 usec] glEnableClientState(array = GL_VERTEX_ARRAY) 1505438 [0.133 usec] glEnableClientState(array = GL_TEXTURE_COORD_ARRAY) 1505439 [0.287 usec] glTexCoordPointer(size = 2, type = GL_FLOAT, stride = 0, pointer = blob(32)) 1505440 [0.209 usec] glVertexPointer(size = 3, type = GL_FLOAT, stride = 0, pointer = blob(48)) 1505441 [6.085 usec] glDrawElements(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_INT, indices = blob(24)) 1505677 [432.663 usec] glXSwapBuffers(dpy = 0x22e08b0, drawable = 67108879)
Another thing I've learned is that trying to profile from user side is completely pointless.
Comment