Commit 28a3731e authored by Timothy Arceri's avatar Timothy Arceri

glsl: skip stringification in preprocessor if in unreachable branch

This fixes compilation of some "No Mans Sky" shaders where the stringification
happens in branches intended for DX12.
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
parent 4738b6ac
......@@ -420,8 +420,10 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
/* This will catch any non-directive garbage after a HASH */
<HASH>{NONSPACE} {
BEGIN INITIAL;
RETURN_TOKEN (GARBAGE);
if (!parser->skipping) {
BEGIN INITIAL;
RETURN_TOKEN (GARBAGE);
}
}
/* An identifier immediately followed by '(' */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment