summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinhyung Jo <jinhyung.jo@samsung.com>2017-12-07 21:18:23 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2017-12-08 08:03:13 +0000
commitf0260072edeef2fa7db37303d5dc56985d5bf7f5 (patch)
tree06dffc4b01cdcb153bfc369cfd76262b4ff9968f
parent755efc0527a39ee8561e4b2d516a9cfab8416766 (diff)
downloademulator-yagl-f0260072edeef2fa7db37303d5dc56985d5bf7f5.tar.gz
emulator-yagl-f0260072edeef2fa7db37303d5dc56985d5bf7f5.tar.bz2
emulator-yagl-f0260072edeef2fa7db37303d5dc56985d5bf7f5.zip
The GLSL patchers did not work correctly with a statement like bellow: #define TextureLookup texture2D The token 'texture2D' in the comment is not parsed with desired result. So, add a new rule for that situation. Change-Id: I84ae9166c0d322baf48d1c20bb74a1c27172c59f Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
-rw-r--r--GLESv2/yagl_glsl_lexer.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/GLESv2/yagl_glsl_lexer.l b/GLESv2/yagl_glsl_lexer.l
index b3508d6..65badd0 100644
--- a/GLESv2/yagl_glsl_lexer.l
+++ b/GLESv2/yagl_glsl_lexer.l
@@ -151,6 +151,12 @@ STRING [^ \r\t\v\f\n()\[\]{},;?:/%*&|^!+\-=<>\.]+
return TOK_TEXTURE2D;
}
+<PP>"texture2D" {
+ struct yagl_glsl_state *state = yagl_glsl_lexer_get_extra(yyscanner);
+ yagl_glsl_state_new_str_token(state, yylval, yytext);
+ return TOK_TEXTURE2D;
+}
+
"texture3DProjLod" {
struct yagl_glsl_state *state = yagl_glsl_lexer_get_extra(yyscanner);
yagl_glsl_state_new_str_token(state, yylval, yytext);