<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 - Wrong column number in shader compilation info log"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=96727">96727</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong column number in shader compilation info log
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.3
          </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>glsl-compiler
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>b7.10110111@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider the following fragment shader:

void main()
{
    int N=100;
    float floA=0.9, floB=234.9;

    float x0=(floA-0.5*N)/floB;
   float x1=(floA-0.5*N)/floB;
  float x2=(floA-0.5*N)/floB;
float x3=(floA-0.5*N)/floB;
    gl_FragColor=vec4(0);
}


Notice the different indentation levels of lines with x0,x1,x2,x3.

Since there's no #version directive here, it's GLSL 1.10, so the implicit
conversions are not available at all. So glCompileShader results in the
following info log:

0:6(17): error: could not implicitly convert operands to arithmetic operator
0:6(12): error: operands to arithmetic operators must be numeric
0:6(11): error: operands to arithmetic operators must be numeric
0:7(17): error: could not implicitly convert operands to arithmetic operator
0:7(12): error: operands to arithmetic operators must be numeric
0:7(11): error: operands to arithmetic operators must be numeric
0:8(17): error: could not implicitly convert operands to arithmetic operator
0:8(12): error: operands to arithmetic operators must be numeric
0:8(11): error: operands to arithmetic operators must be numeric
0:9(16): error: could not implicitly convert operands to arithmetic operator
0:9(11): error: operands to arithmetic operators must be numeric
0:9(10): error: operands to arithmetic operators must be numeric

So far so good. But you can see that column 17 is always given for indented
lines in the "could not convert" message (similar problem is with "must be
numeric" lines) regardless of indentation level, and only when there're no
spaces before the line is the column reported differently.
Actually correct columns are in the last two instances of "could not convert"
message: it looks like the string is first simplified by merging repeated
whitespace into one space, and only then the column is counted. Of course, this
is misleading and actually somewhat useless to the reader, which doesn't
understand what happens with the message.

So the fix should be either to show correct column numbers, or not to show
column at all.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>