projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4738b6a
)
glsl: skip stringification in preprocessor if in unreachable branch
author
Timothy Arceri
<tarceri@itsqueeze.com>
Wed, 29 Aug 2018 01:36:51 +0000
(11:36 +1000)
committer
Timothy Arceri
<tarceri@itsqueeze.com>
Wed, 29 Aug 2018 23:51:57 +0000
(09:51 +1000)
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>
src/compiler/glsl/glcpp/glcpp-lex.l
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/glcpp/glcpp-lex.l
b/src/compiler/glsl/glcpp/glcpp-lex.l
index 9cfcc120222a987c38ba70b257bada893df45d38..fe5845acd4e4bbe8323f529885be7dffe7660d02 100644
(file)
--- a/
src/compiler/glsl/glcpp/glcpp-lex.l
+++ b/
src/compiler/glsl/glcpp/glcpp-lex.l
@@
-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 '(' */