diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-12-01 12:30:07 +1000 |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-12-01 12:30:07 +1000 |
commit | 814c9cc62e299cff662d4b39f54642454b09afbd (patch) | |
tree | 1be23b2d37cde9e64281f70cd4e9f2cc9b183051 | |
parent | c552e26b2d85d2c120742f831178274a1d642dd6 (diff) | |
download | qt-creator-814c9cc62e299cff662d4b39f54642454b09afbd.tar.gz |
Replace the "Qt" GLSL variant with "ES_100"
The Qt variant is almost exactly the same as GLSL/ES,
so there is little point having a separate variant code.
-rw-r--r-- | src/libs/glsl/glslkeywords.cpp | 6 | ||||
-rw-r--r-- | src/libs/glsl/glsllexer.h | 1 | ||||
-rw-r--r-- | src/libs/glsl/specs/glsl.keywords | 6 | ||||
-rw-r--r-- | src/libs/glsl/tests/main.cpp | 3 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditor.cpp | 2 |
5 files changed, 7 insertions, 11 deletions
diff --git a/src/libs/glsl/glslkeywords.cpp b/src/libs/glsl/glslkeywords.cpp index 58a41e2879..59b202a2a4 100644 --- a/src/libs/glsl/glslkeywords.cpp +++ b/src/libs/glsl/glslkeywords.cpp @@ -116,7 +116,7 @@ static inline int classify4(const char *s) { if (s[1] == 'o') { if (s[2] == 'w') { if (s[3] == 'p') { - return Parser::T_LOWP | Lexer::Variant_GLSL_Qt | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400; + return Parser::T_LOWP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400; } } } @@ -274,7 +274,7 @@ static inline int classify5(const char *s) { if (s[2] == 'g') { if (s[3] == 'h') { if (s[4] == 'p') { - return Parser::T_HIGHP | Lexer::Variant_GLSL_Qt | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400; + return Parser::T_HIGHP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400; } } } @@ -563,7 +563,7 @@ static inline int classify7(const char *s) { if (s[4] == 'u') { if (s[5] == 'm') { if (s[6] == 'p') { - return Parser::T_MEDIUMP | Lexer::Variant_GLSL_Qt | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400; + return Parser::T_MEDIUMP | Lexer::Variant_GLSL_ES_100 | Lexer::Variant_GLSL_400; } } } diff --git a/src/libs/glsl/glsllexer.h b/src/libs/glsl/glsllexer.h index b8e906be1a..d56d8cebb6 100644 --- a/src/libs/glsl/glsllexer.h +++ b/src/libs/glsl/glsllexer.h @@ -74,7 +74,6 @@ public: Variant_GLSL_150 = 0x00020000, // 1.50 and higher Variant_GLSL_400 = 0x00040000, // 4.00 and higher Variant_GLSL_ES_100 = 0x00080000, // ES 1.00 and higher - Variant_GLSL_Qt = 0x00100000, Variant_VertexShader = 0x00200000, Variant_FragmentShader = 0x00400000, Variant_Reserved = 0x80000000, diff --git a/src/libs/glsl/specs/glsl.keywords b/src/libs/glsl/specs/glsl.keywords index b964fae7cf..fbbee6cdbf 100644 --- a/src/libs/glsl/specs/glsl.keywords +++ b/src/libs/glsl/specs/glsl.keywords @@ -45,7 +45,7 @@ else flat %variant GLSL_150 float for -highp %variant GLSL_Qt | GLSL_ES_100 | GLSL_400 +highp %variant GLSL_ES_100 | GLSL_400 if in inout @@ -66,7 +66,7 @@ ivec2 ivec3 ivec4 layout %variant GLSL_150 -lowp %variant GLSL_Qt | GLSL_ES_100 | GLSL_400 +lowp %variant GLSL_ES_100 | GLSL_400 mat2 mat2x2 %variant GLSL_120 mat2x3 %variant GLSL_120 @@ -79,7 +79,7 @@ mat4 mat4x2 %variant GLSL_120 mat4x3 %variant GLSL_120 mat4x4 %variant GLSL_120 -mediump %variant GLSL_Qt | GLSL_ES_100 | GLSL_400 +mediump %variant GLSL_ES_100 | GLSL_400 noperspective %variant GLSL_150 out patch %variant GLSL_400 diff --git a/src/libs/glsl/tests/main.cpp b/src/libs/glsl/tests/main.cpp index 8c4e74dab3..11b929f5d1 100644 --- a/src/libs/glsl/tests/main.cpp +++ b/src/libs/glsl/tests/main.cpp @@ -41,9 +41,6 @@ int main(int argc, char *argv[]) variant |= Lexer::Variant_GLSL_400; } else if (!strcmp(argv[1], "--version=es")) { variant |= Lexer::Variant_GLSL_ES_100; - } else if (!strcmp(argv[1], "--version=qt")) { - variant |= Lexer::Variant_GLSL_ES_100 | - Lexer::Variant_GLSL_Qt; } else if (!strcmp(argv[1], "--shader=vertex")) { variant |= Lexer::Variant_VertexShader; } else if (!strcmp(argv[1], "--shader=fragment")) { diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp index cb21ccb6b8..5ff01d764d 100644 --- a/src/plugins/glsleditor/glsleditor.cpp +++ b/src/plugins/glsleditor/glsleditor.cpp @@ -405,7 +405,7 @@ int GLSLTextEditor::languageVariant() const if (isDesktop) variant |= Lexer::Variant_GLSL_120; else - variant |= Lexer::Variant_GLSL_Qt; + variant |= Lexer::Variant_GLSL_ES_100; if (isVertex) variant |= Lexer::Variant_VertexShader; if (isFragment) |