diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-10-26 17:41:47 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-10-26 17:43:14 +0200 |
commit | 701581d1d3a48abb0ac9afb4874c4c591dade7cc (patch) | |
tree | bde705c1b985cf2da6b8ac6c3dec82c53651d89c /servers/visual/shader_language.h | |
parent | aa0fa6b14f62c6aeab04345151cf7c2a9f6df79f (diff) |
Improve error messages related to `shader_type`
The list of allowed shader types is now displayed if any
`shader_type`-related error is emitted.
This makes it easier to remember which shader types are allowed
when creating a new shader.
Diffstat (limited to 'servers/visual/shader_language.h')
-rw-r--r-- | servers/visual/shader_language.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index 3a5630ef42..ceeaaf8872 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -750,6 +750,8 @@ private: Node *_parse_and_reduce_expression(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types); 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); + String _get_shader_type_list(const Set<String> &p_shader_types) const; + 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); |