summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_language.h
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-10-07 16:00:19 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-10-08 10:28:31 +0300
commitb1ac3e256f771cb64cb8cd2deabacf3d0df283d0 (patch)
treec9d860acb7492c865191f9bef2088a448f734e12 /servers/rendering/shader_language.h
parent0647d9dc7dfbd3d4323763ef560d834dc9d403f6 (diff)
Allow declare the shader arrays with a size defined before identifier
Diffstat (limited to 'servers/rendering/shader_language.h')
-rw-r--r--servers/rendering/shader_language.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 1444546f05..4740da0c37 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -979,6 +979,10 @@ private:
bool _validate_varying_using(ShaderNode::Varying &p_varying, String *r_message);
bool _check_node_constness(const Node *p_node) const;
+ Node *_parse_array_size(BlockNode *p_block, const FunctionInfo &p_function_info, int &r_array_size);
+ Error _parse_global_array_size(int &r_array_size);
+ Error _parse_local_array_size(BlockNode *p_block, const FunctionInfo &p_function_info, ArrayDeclarationNode *p_node, ArrayDeclarationNode::Declaration *p_decl, int &r_array_size, bool &r_is_unknown_size);
+
Node *_parse_expression(BlockNode *p_block, const FunctionInfo &p_function_info);
Node *_parse_array_constructor(BlockNode *p_block, const FunctionInfo &p_function_info);
Node *_parse_array_constructor(BlockNode *p_block, const FunctionInfo &p_function_info, DataType p_type, const StringName &p_struct_name, int p_array_size);