From d5aabf34f9273617c75b5a8fe9b572931e3466c9 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Thu, 30 Aug 2018 12:22:33 -0600 Subject: [PATCH] GLSL: Remove use of __ in the implementation of keywords having __. --- glslang/MachineIndependent/Scan.cpp | 4 ++-- glslang/MachineIndependent/glslang.y | 4 ++-- glslang/MachineIndependent/glslang_tab.cpp | 4 ++-- glslang/MachineIndependent/glslang_tab.cpp.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index 66ac4a8..eaedbe8 100755 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -683,7 +683,7 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["smooth"] = SMOOTH; (*KeywordMap)["flat"] = FLAT; #ifdef AMD_EXTENSIONS - (*KeywordMap)["__explicitInterpAMD"] = __EXPLICITINTERPAMD; + (*KeywordMap)["__explicitInterpAMD"] = EXPLICITINTERPAMD; #endif (*KeywordMap)["centroid"] = CENTROID; (*KeywordMap)["precise"] = PRECISE; @@ -1490,7 +1490,7 @@ int TScanContext::tokenizeIdentifier() return keyword; #ifdef AMD_EXTENSIONS - case __EXPLICITINTERPAMD: + case EXPLICITINTERPAMD: if (parseContext.profile != EEsProfile && parseContext.version >= 450 && parseContext.extensionTurnedOn(E_GL_AMD_shader_explicit_vertex_parameter)) return keyword; diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index 4d16b2b..66a53d4 100755 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -146,7 +146,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 %token F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4 %token F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4 -%token NOPERSPECTIVE FLAT SMOOTH LAYOUT __EXPLICITINTERPAMD +%token NOPERSPECTIVE FLAT SMOOTH LAYOUT EXPLICITINTERPAMD %token MAT2X2 MAT2X3 MAT2X4 %token MAT3X2 MAT3X3 MAT3X4 @@ -1135,7 +1135,7 @@ interpolation_qualifier $$.init($1.loc); $$.qualifier.nopersp = true; } - | __EXPLICITINTERPAMD { + | EXPLICITINTERPAMD { #ifdef AMD_EXTENSIONS parseContext.globalCheck($1.loc, "__explicitInterpAMD"); parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); diff --git a/glslang/MachineIndependent/glslang_tab.cpp b/glslang/MachineIndependent/glslang_tab.cpp index 96e245e..a79c480 100755 --- a/glslang/MachineIndependent/glslang_tab.cpp +++ b/glslang/MachineIndependent/glslang_tab.cpp @@ -236,7 +236,7 @@ extern int yydebug; FLAT = 368, SMOOTH = 369, LAYOUT = 370, - __EXPLICITINTERPAMD = 371, + EXPLICITINTERPAMD = 371, MAT2X2 = 372, MAT2X3 = 373, MAT2X4 = 374, @@ -981,7 +981,7 @@ static const char *const yytname[] = "F16VEC2", "F16VEC3", "F16VEC4", "F16MAT2", "F16MAT3", "F16MAT4", "F32VEC2", "F32VEC3", "F32VEC4", "F32MAT2", "F32MAT3", "F32MAT4", "F64VEC2", "F64VEC3", "F64VEC4", "F64MAT2", "F64MAT3", "F64MAT4", - "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", "__EXPLICITINTERPAMD", + "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", "EXPLICITINTERPAMD", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "DMAT2X2", "DMAT2X3", "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", "DMAT4X4", "F16MAT2X2", diff --git a/glslang/MachineIndependent/glslang_tab.cpp.h b/glslang/MachineIndependent/glslang_tab.cpp.h index 7cfb797..9085dd0 100644 --- a/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/glslang/MachineIndependent/glslang_tab.cpp.h @@ -158,7 +158,7 @@ extern int yydebug; FLAT = 368, SMOOTH = 369, LAYOUT = 370, - __EXPLICITINTERPAMD = 371, + EXPLICITINTERPAMD = 371, MAT2X2 = 372, MAT2X3 = 373, MAT2X4 = 374, -- 2.7.4