mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 28a3731e3f)
This commit is contained in:
parent
26b4f8a266
commit
c52bcfa61c
1 changed files with 4 additions and 2 deletions
|
|
@ -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 '(' */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue