summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2019-11-02 12:36:43 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2019-11-02 12:43:32 +0300
commit6b7f8558d962bf67d4cc4bc1d539b925787fdc03 (patch)
tree1494c485ffa230e28718d12381472ade483ac6ed /servers/visual
parent36a785513fb1424b17c7ae217668f7ca402b5790 (diff)
Removed switch operator from GLES2 shader back-end
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/shader_language.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index a57ab92085..f791298472 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -4176,6 +4176,12 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
_set_tkpos(pos); //rollback
}
} else if (tk.type == TK_CF_SWITCH) {
+
+ if (VisualServer::get_singleton()->is_low_end()) {
+ _set_error("\"switch\" operator is supported only on high-end platform!");
+ return ERR_PARSE_ERROR;
+ }
+
// switch() {}
tk = _get_token();
if (tk.type != TK_PARENTHESIS_OPEN) {