mesa/src
Paul Berry 2f2f39c389 glsl: Add parser support for unsized arrays in interface blocks.
Although it's not explicitly stated in the GLSL 1.50 spec, unsized
arrays are allowed in interface blocks.

section 1.2.3 (Changes from revision 5 of version 1.5) of the GLSL
1.50 spec says:

    * Completed full update to grammar section.  Tested spec examples
      against it:

      ...

      * add unsized arrays for block members

And section 7.1 (Vertex and Geometry Shader Special Variables)
includes an unsized array in the built-in gl_PerVertex interface
block:

    out gl_PerVertex {
        vec4 gl_Position;
        float gl_PointSize;
        float gl_ClipDistance[];
    };

Furthermore, GLSL 4.30 contains an example of an unsized array
occurring inside an interface block.  From section 4.3.9 (Interface
Blocks):

    uniform Transform {  // API uses "Transform[2]" to refer to instance 2
        mat4           ModelViewMatrix;
        mat4           ModelViewProjectionMatrix;
        vec4           a[];  // array will get implicitly sized
        float          Deformation;
    } transforms[4];

This patch adds the parser rule to support unsized arrays inside
interface blocks.  Later patches in the series will add the
appropriate semantics to handle them.

Fixes piglit tests:
- spec/glsl-1.50/execution/unsized-in-unnamed-interface-block
- spec/glsl-1.50/linker/unsized-in-unnamed-interface-block

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-10-09 16:49:21 -07:00
..
egl egl/main: remove undefined X11_LIBS automake variable 2013-10-09 10:36:01 -04:00
gallium util/u_math: Fix C++ include of u_math.h on MSVC. 2013-10-10 00:31:53 +01:00
gbm gbm: Link to libwayland-drm if Wayland EGL platform is enabled 2013-08-12 15:16:22 -07:00
getopt
glsl glsl: Add parser support for unsized arrays in interface blocks. 2013-10-09 16:49:21 -07:00
glx glx: Generate fewer errors in MakeContextCurrent 2013-10-08 13:24:20 -04:00
gtest gtest: Build it only for 'make check'. 2013-01-13 12:38:44 +01:00
mapi glapi: add output info to GetProgramiv's params 2013-10-07 09:06:33 -07:00
mesa i965/blorp: Allow format conversions for CopyTexSubImage. 2013-10-09 16:36:50 -07:00
Makefile.am gbm: Link to libwayland-drm if Wayland EGL platform is enabled 2013-08-12 15:16:22 -07:00
SConscript Remove libGLU 2012-08-31 10:58:15 -07:00