<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Civilization 5 - Leaders in the diplomatic interactions screen appear completely black"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93546#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Civilization 5 - Leaders in the diplomatic interactions screen appear completely black"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93546">bug 93546</a>
              from <span class="vcard"><a class="email" href="mailto:freedesktop@psydk.org" title="Hadrien <freedesktop@psydk.org>"> <span class="fn">Hadrien</span></a>
</span></b>
        <pre>Thanks Nicolai. I've been able to produce a trace file but it is huge and the
replay gives some weird geometry rendering. However I've been able to get to
the point where the character is drawn. The geometry is still incorrect but at
least the pixels are black like during the live run of the game. It allowed me
to perform step-by-step debugging into the r600 Mesa code after I rebuilt it
from source with debugging options.

The TGSI program looks a bit different than when I output it with the
environment variable but I get the same error than with the original mesa
libraries released with Ubuntu.

What it looks like is that the temporary variables of the TGSI program are
nearly directly mapped to registers, but the rv770 "only" have 128 registers.
The TGSI program I dumped uses nearly 400 temporary variables. This might
explain the error.

Maybe some registers could be reused to keep below the limit? I've been
browsing a bit about this kind of problem and it seems to be a typical
computer-science compilation problem. A recurring solution I've read about is a
graph coloring algorithm. However I do not know where any of the register
allocation optimization should occur. In the r600 code or when the TGSI program
is generated so all GPU specific code could benefit of it? In any case it looks
like a tough problem.</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>