<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - high cpu usage, poor performance in Borderlands 2 with radeonsi, PRIME"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=84663">84663</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>high cpu usage, poor performance in Borderlands 2 with radeonsi, PRIME
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>haagch@frickel.club
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=107328" name="attach_107328" title="sysprof recording from borderlands 2 only">attachment 107328</a> <a href="attachment.cgi?id=107328&action=edit" title="sysprof recording from borderlands 2 only">[details]</a></span>
sysprof recording from borderlands 2 only

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor
Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Wimbledon XT [Radeon HD 7970M] (rev ff)

xorg stable, mesa git, linux 3.17-rc7.

I have had something similar in some games I think, but most recently with
Borderlands 2.

Here is a random screenshot with the HUD fps display from someone with a HD
7870 that shows that it runs mostly with 60 fps:
<a href="https://i.imgur.com/qH0sBkl.jpg">https://i.imgur.com/qH0sBkl.jpg</a>

And here is a short clip of how it runs for me that shows it runs with 20-30
fps: <a href="https://www.youtube.com/watch?v=ZeZreRntt3k">https://www.youtube.com/watch?v=ZeZreRntt3k</a>
Radeontop says that the gpu is only used to ~30%.
While running Borderlands 2 the CPU usage is always at 100+% on my i7 3632qm.


I was undecided whether to report this here, but the difference is quite large
so I thought I'd give it a try because I think the game itself is not supposed
to use this much cpu time, so maybe it has something to do with the driver.

Theories:

< glennk> guessing from that output that the game engine uses a lot of
occlusion queries and is stalling on them

I haven't really found anything to test that yet.

< agd5f> haagch, hybrid laptops have to do a lot of extra copying to get the
frame from the rendering GPU to the display GPU

I hope that the overhead is not *that* large because losing 70+% of gpu time
would make it kind of useless for the affected games.

Fortunately many (most?) games run much better, for example unigine valley
shows good gpu usage: <a href="https://www.youtube.com/watch?v=sLWvYJlfvWM">https://www.youtube.com/watch?v=sLWvYJlfvWM</a>
which makes me believe that there is a specific bottleneck.

Attached is a sysprof profile of borderlands 2 but I don't know which of it is
normal (like 25% total cpu time for glDrawRangeElements?).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>