Skip to contentSkip to conversation

New: glClear occasionally taking >60ms

Bug 50616 [email protected] 1 participant 8 messages Jun 2, 2012 – Jun 6, 2012

lore
Share & tools
lore
#0 lore raw

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: [email protected]
        ReportedBy: [email protected]

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

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 50616] glClear occasionally taking >60ms

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=50616

--- Comment #2 from Alex Deucher <[email protected]> 2012-06-03 08:08:04 PDT --- Does setting:
Option "SwapbuffersWait" "false"
in the device section of your xorg.conf help?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 50616] glClear occasionally taking >60ms

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=50616

--- Comment #3 from Lauri Kasanen <[email protected]> 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.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 50616] glClear occasionally taking >60ms

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=50616

--- Comment #4 from Michel Dänzer <[email protected]> 2012-06-05 03:46:52 PDT --- (In reply to comment #3)

Quoted 1 line

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.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

[Bug 50616] glClear occasionally taking >60ms

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=50616

--- Comment #5 from Lauri Kasanen <[email protected]> 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...

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 50616] glClear occasionally taking >60ms

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=50616

--- Comment #6 from Michel Dänzer <[email protected]> 2012-06-06 02:13:30 PDT --- (In reply to comment #5)

Quoted 1 line

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. :)

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

[Bug 50616] glClear occasionally taking >60ms

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=50616

Lauri Kasanen <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |NOTABUG
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.