<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 --- - interface blocks not working with #version 140 with #extension : GL_ARB_separate_shader_objects : enable"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=74852">74852</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>interface blocks not working with #version 140 with #extension : GL_ARB_separate_shader_objects : enable
          </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>dang@valvesoftware.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>I am the sso5 branch at commit 82f823ec58210fa522c8f65a954acd720471a7da running
on Intel Sandy Bridge.

The problem is that when using #version 140 (the highest version supported by
SNB) and enabling #extension GL_ARB_separate_shader_objects : enable I get the
following error from glsl_compiler:

0:7(1): error: #version 150 required for using interface blocks

This can be repro'd with the following shader:

#version 140
#extension GL_ARB_explicit_attrib_location : enable
#extension GL_ARB_separate_shader_objects : enable
layout(location = 0) in vec4 inPos;  
layout(location = 1) in vec2 inTexCoords;  
layout(location = 0) out vec4 texCoords;  
out gl_PerVertex  
{  
  vec4 gl_Position; 
};  
void main()  
{    
  texCoords = vec4( inTexCoords, 0.0, 0.0 );  
  gl_Position = inPos;  
}  

I have fixed this bug locally.  A diff of the fix follows.  

--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -2170,9 +2170,9 @@ basic_interface_block:
                                "required for defining uniform blocks");
          }
       } else {
-         if (state->es_shader || state->language_version < 150) {
+         if (state->es_shader || (state->language_version < 150 &&
!state->has_separate_shader_objects())) {
             _mesa_glsl_error(& @1, state,
-                             "#version 150 required for using "
+                             "#version 150 / GL_ARB_separate_shader_objects
required for using "
                              "interface blocks");
          }
       }</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>