glsl: Remove shader stage checking for extension handling.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 29 Jul 2013 17:40:51 +0000 (10:40 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 29 Jul 2013 17:51:25 +0000 (10:51 -0700)
commit6aba035f6b0dee0e0b78b2110fa75463c7888c3a
tree9a7caf140e6408c0109278ab4fdaf0d496117950
parent0ed02d435eb238e7d0821ef0087ef986738f4eab
glsl: Remove shader stage checking for extension handling.

Certain extensions only add functionality to particular shader stages.
(For example, ARB_draw_instanced only adds variables to the vertex
shader stage.)

Previously, we only allowed such extensions to be enabled in the shader
stages where they're useful.  However, I've never found any text which
mandates that behavior; in my opinion, you should be able to turn on
extensions in any shader stage, even if they have no effect.

Fixes Piglit tests glslparsertest/glsl2/draw_buffers-05.vert and
ARB_draw_instanced/preprocessor/feature-macro-enabled.frag.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29185
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/glsl_parser_extras.cpp