diff --git a/src/compiler/glsl/glcpp/glcpp-lex.l b/src/compiler/glsl/glcpp/glcpp-lex.l index 05447b31e4c..f7003da0cc8 100644 --- a/src/compiler/glsl/glcpp/glcpp-lex.l +++ b/src/compiler/glsl/glcpp/glcpp-lex.l @@ -434,8 +434,10 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? /* This will catch any non-directive garbage after a HASH */ {NONSPACE} { - BEGIN INITIAL; - RETURN_TOKEN (GARBAGE); + if (!parser->skipping) { + BEGIN INITIAL; + RETURN_TOKEN (GARBAGE); + } } /* An identifier immediately followed by '(' */