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

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [i965 Bisected]Piglit/glslparsertest_CorrectVersion1.V110.frag fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=74207">74207</a>
          </td>
        </tr>

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

        <tr>
          <th>Assignee</th>
          <td>mattst88@gmail.com
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[i965 Bisected]Piglit/glslparsertest_CorrectVersion1.V110.frag fails
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

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

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

        <tr>
          <th>Reporter</th>
          <td>huax.lu@intel.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>System Environment:
--------------------------
Platform: Ironlake/Sandybridge/Ivybridge/Haswell/Baytrail
Libdrm:       
(master)libdrm-2.4.52-2-gcbb31f2d6e674513c0f66484c414475baba09153
Mesa:        (master)023a50dd9b368fba5b53dca347e90b46893c0348
Xserver:   
(master)xorg-server-1.15.0-583-gda1660deeb9032ecca61f4bcdc9fc2eec2ada445
Xf86_video_intel:(master)2.99.907-60-g9f3fc9ec49f0caf53344577896ef9b6468cd3d4f
Cairo:        (master)5de25951a43f51cade42549ae60e52ffb391d61e
Libva:        (staging)79ddde6bab54618046f136471c020c08ff4fde50
Libva_intel_driver:(staging)c25fe67b1f1e269dc8d0152ce883788ef9288aea
Kernel:    (drm-intel-nightly) 164a4cb4c1431a0689f85507868356fae24da638

Bug detailed description:
-----------------------------
It fails on Ironlake/Sandybridge/Ivybridge/Haswell/Baytrail with mesa master
branch. It doesn't happen on 10.0 branch.
(GLES20)GL_build_DuplicateVersion1_V100_frag.test also fails with same bisect
commit.

Bisect shows: 3e0e9e3bf9e597eb74b06381b3418c958be4d452 is the first bad commit.
commit 3e0e9e3bf9e597eb74b06381b3418c958be4d452
Author:     Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>>
AuthorDate: Sat Jan 25 11:57:02 2014 -0800
Commit:     Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>>
CommitDate: Mon Jan 27 21:15:35 2014 -0800

    glcpp: Check version_resolved in the proper place.

    The check was in the wrong place, such that if a shader incorrectly put
    a preprocessor token before the #version declaration, the version would
    be resolved twice, leading to a segmentation fault when attempting to
    redefine the __VERSION__ macro.

     #extension GL_ARB_sample_shading: require
     #version 130
     void main() {}

    Also, rename glcpp_parser_resolve_version to
                 glcpp_parser_resolve_implicit_version to avoid confusion.

    Reviewed-by: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>>
    Reviewed-by: Carl Worth <<a href="mailto:cworth@cworth.org">cworth@cworth.org</a>>
    Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>>


Successfully compiled fragment shader
/GFX/Test/Piglit/piglit/tests/glslparsertest/shaders/CorrectVersion1.V110.frag:
Shader source:
// [config]
// expect_result: fail
// glsl_version: 1.10
//
// # NOTE: Config section was auto-generated from file
// # NOTE: 'glslparser.tests' at git revision
// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
// [end config]

/* Only one version statement is allowed; two should raise an error. */
#version 110
#version 110

void main()
{
   gl_FragColor = vec4(1);
}

PIGLIT: {'result': 'fail' }


Reproduce steps:
----------------------------
1. xinit
2. ./bin/glslparsertest tests/glslparsertest/shaders/CorrectVersion1.V110.frag
fail 1.10</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>