<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 ES does not allow non-constant initializers for globals"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90157">90157</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GLSL ES does not allow non-constant initializers for globals
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </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>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Desktop GLSL allows things like

uniform int foo;
int bar = foo + 10;

void main()
{
    ...
}

However, the GLSL ES 3.0 and 3.1 specifications have the following language in
section 4.3:

    "Initializers may only be used in declarations of globals with no storage
    qualifier or with a const qualifier. Such initializers must be a constant
    expression."

There is anecdotal evidence that other implementations, at least on Android,
enforce this restriction.  At the very least, we should emit a portability
warning.  We probably should emit an error (in GLSL ES only) and have a driconf
option to disable.</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>