glsl/glcpp: Swallow empty #pragma directives.
authorCarl Worth <cworth@cworth.org>
Wed, 2 Jul 2014 17:32:46 +0000 (10:32 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 7 Aug 2014 23:08:29 +0000 (16:08 -0700)
commita48ff781c1cac00ad432edf88fafa44e667fa90f
treec398ba898969bec91d1f81fc370661bde59036f6
parentbf9bce5bea17e8034927e34bcafa4c694790d9b9
glsl/glcpp: Swallow empty #pragma directives.

Previously, we were passing these through, just like any other pragma. But the
downstream compiler was tripping up on them. It seems easier to swallow these
in the preprocessor and not pass them on at all rather than fixing the
downstream compiler.

This fixes the following Khronos GLES3 CTS tests:

preprocessor.pragmas.pragma_vertex
preprocessor.pragmas.pragma_fragment

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glcpp/glcpp-lex.l
src/glsl/glcpp/tests/127-pragma-empty.c.expected