glsl/gs: Prevent illegal input/output primitive types.
authorPaul Berry <stereotype441@gmail.com>
Tue, 22 Oct 2013 17:26:52 +0000 (10:26 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 23 Oct 2013 23:51:05 +0000 (16:51 -0700)
commit8e15207c9d206e3698a240092afdf8cddb6f5c02
tree2ca1d0e933e792537234d59e9285c1aafed1ec51
parent867d0cc1fece5343e8c1655fc1b799aa8fcf5a0d
glsl/gs: Prevent illegal input/output primitive types.

From the GLSL 1.50 spec, section 4.3.8.1 (Input Layout Qualifiers):

    The layout qualifier identifiers for geometry shader inputs are

        layout-qualifier-id
            points
            lines
            lines_adjacency
            triangles
            triangles_adjacency

And from section 4.3.8.2 (Output Layout Qualifiers)

    The layout qualifier identifiers for geometry shader outputs are

        layout-qualifier-id
            points
            line_strip
            triangle_strip
            max_vertices = integer-constant

We were erroneously allowing line_strip and triangle_strip to be used
as input qualifiers, and we were allowing lines, lines_adjacency,
triangles, and triangles_adjacency to be used as output qualifiers.

Fixes piglit tests "glsl-1.50-gs-{input,output}-layout-qualifiers *".

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glsl_parser.yy