<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 - glsl/glcpp/tests/glcpp-test-cr-lf regression"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94447">94447</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glsl/glcpp/tests/glcpp-test-cr-lf regression
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

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

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

        <tr>
          <th>Keywords</th>
          <td>bisected, regression
          </td>
        </tr>

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

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

        <tr>
          <th>Component</th>
          <td>Mesa core
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vlee@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>idr@freedesktop.org, kenneth@whitecape.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>mesa: a100a57e30010da49c96f84a661cec9c57f9eebe (master 11.3.0-devel)

$ make check
[...]
PASS: glsl/glcpp/tests/glcpp-test
FAIL: glsl/glcpp/tests/glcpp-test-cr-lf
PASS: glsl/tests/blob-test
PASS: glsl/tests/general-ir-test
PASS: glsl/tests/optimization-test
PASS: glsl/tests/sampler-types-test
PASS: glsl/tests/uniform-initializer-test
PASS: nir/tests/control_flow_tests

07ec67d85ca652b76fb91abd68b6ad98e56a49df is the first bad commit
commit 07ec67d85ca652b76fb91abd68b6ad98e56a49df
Author: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>>
Date:   Fri Mar 4 18:26:00 2016 -0800

    glcpp: Implicitly resolve version after the first non-space/hash token.

    We resolved the implicit version directive when processing control lines,
    such as #ifdef, to ensure any built-in macros exist.  However, we failed
    to resolve it when handling ordinary text.

    For example,

            int x = __VERSION__;

    should resolve __VERSION__ to 110, but since we never resolved the implicit
    version, none of the built-in macros exist, so it was left as is.

    This also meant we allowed the following shader to slop through:

            123
            #version 120

    Nothing would cause the implicit version to take effect, so when we saw
    the #version directive, we thought everything was peachy.

    This patch makes the lexer's per-token action resolve the implicit
    version on the first non-space/newline/hash token that isn't part of
    a #version directive, fulfilling the GLSL language spec:

    "The #version directive must occur in a shader before anything else,
     except for comments and white space."

    Because we emit #version as HASH_TOKEN then VERSION_TOKEN, we have to
    allow HASH_TOKEN to slop through as well, so we don't resolve the
    implicit version as soon as we see the # character.  However, this is
    fine, because the parser's HASH_TOKEN NEWLINE rule does resolve the
    version, disallowing cases like:

            #
            #version 120

    This patch also adds the above shaders as new glcpp tests.

    Fixes dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.
    {gl_es_1_vertex,gl_es_1_fragment}.

    Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>>
    Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>