summaryrefslogtreecommitdiff
path: root/servers/visual/shader_language.h
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2019-08-28 16:39:33 +0300
committerGitHub <noreply@github.com>2019-08-28 16:39:33 +0300
commit96ea1e6fb073a32aab2bbefb5eec12769a8435ed (patch)
tree6e9044c05744b6f65a080238b9f1e85fa0df2bc4 /servers/visual/shader_language.h
parentb791efdb1642dcbe0a0572072a176ba39d47c9e1 (diff)
parent38601dd3e959d09a659b2700cce5e2f2ddbe82a1 (diff)
Merge pull request #31600 from Chaosus/shader_func_return_fix
Fix shader crash when users miss the return statement
Diffstat (limited to 'servers/visual/shader_language.h')
-rw-r--r--servers/visual/shader_language.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index b71788513e..6753456323 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -750,6 +750,9 @@ private:
Error _parse_block(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false);
Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<StringName> &p_render_modes, const Set<String> &p_shader_types);
+ Error _find_last_flow_op_in_block(BlockNode *p_block, FlowOperation p_op);
+ Error _find_last_flow_op_in_op(ControlFlowNode *p_flow, FlowOperation p_op);
+
public:
//static void get_keyword_list(ShaderType p_type,List<String> *p_keywords);