summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/compiler/translator/glslang.l
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/angle/src/compiler/translator/glslang.l')
-rwxr-xr-xgfx/angle/src/compiler/translator/glslang.l75
1 files changed, 19 insertions, 56 deletions
diff --git a/gfx/angle/src/compiler/translator/glslang.l b/gfx/angle/src/compiler/translator/glslang.l
index a30f2c33e..7fe289302 100755
--- a/gfx/angle/src/compiler/translator/glslang.l
+++ b/gfx/angle/src/compiler/translator/glslang.l
@@ -22,8 +22,6 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
-/* clang-format off */
-
// Ignore errors in auto-generated code.
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-function"
@@ -46,9 +44,6 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
#include "compiler/preprocessor/Token.h"
#include "compiler/translator/util.h"
#include "compiler/translator/length_limits.h"
-
-using namespace sh;
-
#include "glslang_tab.h"
/* windows only pragma */
@@ -76,8 +71,6 @@ static int reserved_word(yyscan_t yyscanner);
static int ES2_reserved_ES3_keyword(TParseContext *context, int token);
static int ES2_keyword_ES3_reserved(TParseContext *context, int token);
static int ES2_ident_ES3_keyword(TParseContext *context, int token);
-static int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
-static int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token);
static int uint_constant(TParseContext *context);
static int int_constant(TParseContext *context);
static int float_constant(yyscan_t yyscanner);
@@ -194,25 +187,11 @@ O [0-7]
"layout" { return ES2_ident_ES3_keyword(context, LAYOUT); }
-"image2D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2D); }
-"iimage2D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2D); }
-"uimage2D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2D); }
-"image2DArray" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE2DARRAY); }
-"iimage2DArray" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE2DARRAY); }
-"uimage2DArray" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE2DARRAY); }
-"image3D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGE3D); }
-"uimage3D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGE3D); }
-"iimage3D" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGE3D); }
-"iimageCube" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IIMAGECUBE); }
-"uimageCube" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, UIMAGECUBE); }
-"imageCube" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, IMAGECUBE); }
-"readonly" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, READONLY); }
-"writeonly" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, WRITEONLY); }
-"coherent" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, COHERENT); }
-"restrict" { return ES2_ident_ES3_reserved_ES3_1_keyword(context, RESTRICT); }
-"volatile" { return ES2_and_ES3_reserved_ES3_1_keyword(context, VOLATILE); }
-
/* Reserved keywords for GLSL ES 3.00 that are not reserved for GLSL ES 1.00 */
+"coherent" |
+"restrict" |
+"readonly" |
+"writeonly" |
"resource" |
"atomic_uint" |
"noperspective" |
@@ -225,11 +204,23 @@ O [0-7]
"filter" |
"image1D" |
+"image2D" |
+"image3D" |
+"imageCube" |
"iimage1D" |
+"iimage2D" |
+"iimage3D" |
+"iimageCube" |
"uimage1D" |
+"uimage2D" |
+"uimage3D" |
+"uimageCube" |
"image1DArray" |
+"image2DArray" |
"iimage1DArray" |
+"iimage2DArray" |
"uimage1DArray" |
+"uimage2DArray" |
"image1DShadow" |
"image2DShadow" |
"image1DArrayShadow" |
@@ -287,6 +278,7 @@ O [0-7]
"inline" |
"noinline" |
+"volatile" |
"public" |
"static" |
"extern" |
@@ -471,24 +463,6 @@ int ES2_keyword_ES3_reserved(TParseContext *context, int token)
return token;
}
-int ES2_ident_ES3_reserved_ES3_1_keyword(TParseContext *context, int token)
-{
- struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
- yyscan_t yyscanner = (yyscan_t) context->getScanner();
-
- if (context->getShaderVersion() < 300)
- {
- yylval->lex.string = NewPoolTString(yytext);
- return check_type(yyscanner);
- }
- else if (context->getShaderVersion() == 300)
- {
- return reserved_word(yyscanner);
- }
-
- return token;
-}
-
int ES2_ident_ES3_keyword(TParseContext *context, int token)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
@@ -504,18 +478,6 @@ int ES2_ident_ES3_keyword(TParseContext *context, int token)
return token;
}
-int ES2_and_ES3_reserved_ES3_1_keyword(TParseContext *context, int token)
-{
- yyscan_t yyscanner = (yyscan_t) context->getScanner();
-
- if (context->getShaderVersion() < 310)
- {
- return reserved_word(yyscanner);
- }
-
- return token;
-}
-
int uint_constant(TParseContext *context)
{
struct yyguts_t* yyg = (struct yyguts_t*) context->getScanner();
@@ -617,7 +579,8 @@ int glslang_scan(size_t count, const char* const string[], const int length[],
if (context->getFragmentPrecisionHigh())
preprocessor->predefineMacro("GL_FRAGMENT_PRECISION_HIGH", 1);
- preprocessor->setMaxTokenSize(sh::GetGlobalMaxTokenSize(context->getShaderSpec()));
+ preprocessor->setMaxTokenSize(GetGlobalMaxTokenSize(context->getShaderSpec()));
return 0;
}
+