[Bug 74852] New: interface blocks not working with #version 140 with #extension : GL_ARB_separate_shader_objects : enable

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 11 11:30:04 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=74852

          Priority: medium
            Bug ID: 74852
          Assignee: idr at freedesktop.org
           Summary: interface blocks not working with #version 140 with
                    #extension : GL_ARB_separate_shader_objects : enable
        QA Contact: intel-3d-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: dang at valvesoftware.com
          Hardware: All
            Status: NEW
           Version: git
         Component: glsl-compiler
           Product: Mesa

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");
          }
       }

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20140211/13543360/attachment-0001.html>


More information about the intel-3d-bugs mailing list