[Bug 96727] Wrong column number in shader compilation info log

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 29 14:55:09 UTC 2016


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

            Bug ID: 96727
           Summary: Wrong column number in shader compilation info log
           Product: Mesa
           Version: 10.3
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: idr at freedesktop.org
          Reporter: b7.10110111 at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160629/ae6cf470/attachment.html>


More information about the intel-3d-bugs mailing list