forked from qt-creator/qt-creator
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.
This commit is contained in:
@@ -116,7 +116,7 @@ static inline int classify4(const char *s) {
|
|||||||
if (s[1] == 'o') {
|
if (s[1] == 'o') {
|
||||||
if (s[2] == 'w') {
|
if (s[2] == 'w') {
|
||||||
if (s[3] == 'p') {
|
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[2] == 'g') {
|
||||||
if (s[3] == 'h') {
|
if (s[3] == 'h') {
|
||||||
if (s[4] == 'p') {
|
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[4] == 'u') {
|
||||||
if (s[5] == 'm') {
|
if (s[5] == 'm') {
|
||||||
if (s[6] == 'p') {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ public:
|
|||||||
Variant_GLSL_150 = 0x00020000, // 1.50 and higher
|
Variant_GLSL_150 = 0x00020000, // 1.50 and higher
|
||||||
Variant_GLSL_400 = 0x00040000, // 4.00 and higher
|
Variant_GLSL_400 = 0x00040000, // 4.00 and higher
|
||||||
Variant_GLSL_ES_100 = 0x00080000, // ES 1.00 and higher
|
Variant_GLSL_ES_100 = 0x00080000, // ES 1.00 and higher
|
||||||
Variant_GLSL_Qt = 0x00100000,
|
|
||||||
Variant_VertexShader = 0x00200000,
|
Variant_VertexShader = 0x00200000,
|
||||||
Variant_FragmentShader = 0x00400000,
|
Variant_FragmentShader = 0x00400000,
|
||||||
Variant_Reserved = 0x80000000,
|
Variant_Reserved = 0x80000000,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ else
|
|||||||
flat %variant GLSL_150
|
flat %variant GLSL_150
|
||||||
float
|
float
|
||||||
for
|
for
|
||||||
highp %variant GLSL_Qt | GLSL_ES_100 | GLSL_400
|
highp %variant GLSL_ES_100 | GLSL_400
|
||||||
if
|
if
|
||||||
in
|
in
|
||||||
inout
|
inout
|
||||||
@@ -66,7 +66,7 @@ ivec2
|
|||||||
ivec3
|
ivec3
|
||||||
ivec4
|
ivec4
|
||||||
layout %variant GLSL_150
|
layout %variant GLSL_150
|
||||||
lowp %variant GLSL_Qt | GLSL_ES_100 | GLSL_400
|
lowp %variant GLSL_ES_100 | GLSL_400
|
||||||
mat2
|
mat2
|
||||||
mat2x2 %variant GLSL_120
|
mat2x2 %variant GLSL_120
|
||||||
mat2x3 %variant GLSL_120
|
mat2x3 %variant GLSL_120
|
||||||
@@ -79,7 +79,7 @@ mat4
|
|||||||
mat4x2 %variant GLSL_120
|
mat4x2 %variant GLSL_120
|
||||||
mat4x3 %variant GLSL_120
|
mat4x3 %variant GLSL_120
|
||||||
mat4x4 %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
|
noperspective %variant GLSL_150
|
||||||
out
|
out
|
||||||
patch %variant GLSL_400
|
patch %variant GLSL_400
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ int main(int argc, char *argv[])
|
|||||||
variant |= Lexer::Variant_GLSL_400;
|
variant |= Lexer::Variant_GLSL_400;
|
||||||
} else if (!strcmp(argv[1], "--version=es")) {
|
} else if (!strcmp(argv[1], "--version=es")) {
|
||||||
variant |= Lexer::Variant_GLSL_ES_100;
|
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")) {
|
} else if (!strcmp(argv[1], "--shader=vertex")) {
|
||||||
variant |= Lexer::Variant_VertexShader;
|
variant |= Lexer::Variant_VertexShader;
|
||||||
} else if (!strcmp(argv[1], "--shader=fragment")) {
|
} else if (!strcmp(argv[1], "--shader=fragment")) {
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ int GLSLTextEditor::languageVariant() const
|
|||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
variant |= Lexer::Variant_GLSL_120;
|
variant |= Lexer::Variant_GLSL_120;
|
||||||
else
|
else
|
||||||
variant |= Lexer::Variant_GLSL_Qt;
|
variant |= Lexer::Variant_GLSL_ES_100;
|
||||||
if (isVertex)
|
if (isVertex)
|
||||||
variant |= Lexer::Variant_VertexShader;
|
variant |= Lexer::Variant_VertexShader;
|
||||||
if (isFragment)
|
if (isFragment)
|
||||||
|
|||||||
Reference in New Issue
Block a user