<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 --- - way to force glsl compiler to use specific glsl version? (e.g. for shaders with no #version)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=74092">74092</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>way to force glsl compiler to use specific glsl version? (e.g. for shaders with no #version)
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

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

        <tr>
          <th>Reporter</th>
          <td>haagch.christoph@googlemail.com
          </td>
        </tr>

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

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

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

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

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Unfortunately some developers still don't seem to read the specifications and
write code that should not work.

For example if no #version is set in shaders, according to spec glsl version
1.10 is assumed. I would like a way to override that behavior.

There are already two variables related to that:
force_glsl_extensions_warn
MESA_GLSL_VERSION_OVERRIDE
but as far as I am aware the first doesn't help with syntax changes like arrays
as out or inout parameters and the second does apparently not influence what
the compiler will assume when no #version is set.

An example of a shader that can not be compiled with
force_glsl_extensions_warn=true MESA_GLSL_VERSION_OVERRIDE=130 would be this
one:

void a(inout vec4 b[1]) {}


Some time ago this was on the mailing list, but rejected because for several
reason that was the wrong place and way to do it:
<a href="http://lists.freedesktop.org/archives/mesa-dev/2012-August/026022.html">http://lists.freedesktop.org/archives/mesa-dev/2012-August/026022.html</a></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>