<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - r600g R600_LLVM=1 bad rendering (light blue instead of grey)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=55256">55256</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>r600g R600_LLVM=1 bad rendering (light blue instead of grey)
          </td>
        </tr>

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>edwin+mesa@etorok.net
          </td>
        </tr>

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

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

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

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/R600
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=67592" name="attach_67592" title="apitrace">attachment 67592</a> <a href="attachment.cgi?id=67592&action=edit" title="apitrace">[details]</a></span>
apitrace

Attached is an apitrace, and screenshots.

Bad behaviour with --enable-r600-llvm-compiler:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 3.0 Mesa 9.1-devel (git-fb40f88)
OpenGL shading language version string: 1.30

If you look at the 'bad.png' screenshot you'll see that the 4th column is light
blue. It should be grey.
With R600_LLVM=0 the good behaviour is seen: good.png.

See the apitrace for the full shader, here is the relevant bit:
    else if (gl_FragCoord.x < 640)
        color = vec4(1.0f, 1.0f, 1.0f, 1.0f);//white
    [...]
        vec4 color0, color1, color2, color3;
        if (gl_FragCoord.y < 200) {
            color0 = color1 = color2 = color;//75%
   [...]
        } else if (xmod < 55 || xmod >= 105 ||
                   ymod < 75 || ymod >= 125) {
            // real color
            // TODO: buggy on r600g with LLVM?
            gl_FragColor = (color0 + color1 + color2 + color3) / 4.0f;

P.S.: the shader is not optimal, most of the branches could be moved out of it,
I haven't tried to minimize the testcase though.</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>