<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 --- - Linking fails when not writing gl_Position."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83380">83380</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>Linking fails when not writing gl_Position.
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </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>kondapallykalyancontribute@gmail.com
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>10.2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>glsl-compiler
          </td>
        </tr>

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

>From GLSL3.0 Spec(section 7.1)
"The variable gl_Position is intended for writing the homogeneous vertex
position. It can be written at any time during shader execution. This value
will be used by primitive assembly, clipping, culling, and other fixed
functionality operations, if present, that operate on primitives after vertex
processing has occurred. Its value is undefined after the vertex processing
stage if the vertex shader executable does not write gl_Position."

Failing to write to a gl_position is not an error and atleast the linking of
shaders should pass. Mesa throws an linker error in case we dont write to a
gl_position. 


GL & GLSL version:

OpenGL ES 3.0 Mesa 10.3.0-devel (git-a1853ea)
OpenGL ES GLSL ES 3.0


Use Case:

The following WebGL conformance tests fail when running Chromium Web Browser
with Wayland(<a href="https://github.com/01org/ozone-wayland">https://github.com/01org/ozone-wayland</a>)

1)<a href="https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/glsl/misc/empty_main.vert.html">https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/glsl/misc/empty_main.vert.html</a>
2)<a href="https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/glsl/misc/gl_position_unset.vert.html">https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/glsl/misc/gl_position_unset.vert.html</a>

Related discussion on khronos webgl mailing list:
<a href="http://www.khronos.org/webgl/public-mailing-list/archives/1306/msg00042.html">http://www.khronos.org/webgl/public-mailing-list/archives/1306/msg00042.html</a>

Possible fix:
I have attached the patch which changes the error to warning.</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>