https://bugs.freedesktop.org/show_bug.cgi?id=50616
Bug #: 50616 Summary: glClear occasionally taking >60ms Classification: Unclassified Product: Mesa Version: 8.0 Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: minor Priority: medium Component: Drivers/Gallium/r600 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: curaga@operamail.com
I have a test app that draws 65k point sprites, apitrace: http://kiwi6.com/file/0c0512r1no (980kb).
Apitrace says that on average glClear takes 28ms, and many clear calls take over 60ms. Surely it shouldn't take that long?
If it were because of tearing prevention, it should take at most 16ms (1/60Hz).
--
vblank_mode=0 had no change, oprofile says Mesa takes less than 2% cpu. Latencytop shows radeon_fence_wait taking between 3 and 5ms during rendering.
--
Mesa 8.0.3 Linux 3.2.17 HD4350 / r600g
https://bugs.freedesktop.org/show_bug.cgi?id=50616
--- Comment #1 from Lauri Kasanen curaga@operamail.com 2012-06-02 06:32:41 PDT --- http://kiwi6.com/file/95a4z148f2 (550kb)
The timing output from apitrace.
https://bugs.freedesktop.org/show_bug.cgi?id=50616
--- Comment #2 from Alex Deucher agd5f@yahoo.com 2012-06-03 08:08:04 PDT --- Does setting: Option "SwapbuffersWait" "false" in the device section of your xorg.conf help?
https://bugs.freedesktop.org/show_bug.cgi?id=50616
--- Comment #3 from Lauri Kasanen curaga@operamail.com 2012-06-03 08:22:27 PDT --- No, it does not.
It improved the average a tiny bit, but the long ones were still there.
https://bugs.freedesktop.org/show_bug.cgi?id=50616
--- Comment #4 from Michel Dänzer michel@daenzer.net 2012-06-05 03:46:52 PDT --- (In reply to comment #3)
It improved the average a tiny bit, but the long ones were still there.
Did you try it with vblank_mode=0 as well?
Calling glFinish() instead of glFlush() before glXSwapBuffers() might give a better idea of where the time is actually spent.
P.S. Please attach files here directly instead of referencing external sites.
https://bugs.freedesktop.org/show_bug.cgi?id=50616
--- Comment #5 from Lauri Kasanen curaga@operamail.com 2012-06-05 11:42:35 PDT --- OK, with swapbufferswait off, vblank_mode=0, and added glFinish, most of the time is indeed spent in glFinish, up to 60ms.
glClear takes on average 110 us, with the highest being 2.6ms. Still high, but not alarmingly so.
I suppose this means the card is just that slow?
PS: On the files, last time I tried to attach apitrace output here I hit a size limit...
https://bugs.freedesktop.org/show_bug.cgi?id=50616
--- Comment #6 from Michel Dänzer michel@daenzer.net 2012-06-06 02:13:30 PDT --- (In reply to comment #5)
I suppose this means the card is just that slow?
It means the time is spent for the actual rendering, not just for the clears. Maybe you can narrow it down further, e.g. by sprinkling glFinish() calls across more places.
You might get better performance out of the card with a current 3.5-rc kernel thanks to better tiling setup, but it is a lower end card, so I wouldn't expect any miracles. :)
https://bugs.freedesktop.org/show_bug.cgi?id=50616
Lauri Kasanen curaga@operamail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |NOTABUG
dri-devel@lists.freedesktop.org