diff options
Diffstat (limited to 'servers/rendering/shader_language.h')
-rw-r--r-- | servers/rendering/shader_language.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h index a91fa57a8e..c02d6c47ec 100644 --- a/servers/rendering/shader_language.h +++ b/servers/rendering/shader_language.h @@ -646,10 +646,9 @@ public: struct Varying { enum Stage { STAGE_UNKNOWN, - STAGE_VERTEX, // transition stage to STAGE_VERTEX_TO_FRAGMENT or STAGE_VERTEX_TO_LIGHT, emits error if they are not used - STAGE_FRAGMENT, // transition stage to STAGE_FRAGMENT_TO_LIGHT, emits error if it's not used - STAGE_VERTEX_TO_FRAGMENT, - STAGE_VERTEX_TO_LIGHT, + STAGE_VERTEX, // transition stage to STAGE_VERTEX_TO_FRAGMENT_LIGHT, emits warning if it's not used + STAGE_FRAGMENT, // transition stage to STAGE_FRAGMENT_TO_LIGHT, emits warning if it's not used + STAGE_VERTEX_TO_FRAGMENT_LIGHT, STAGE_FRAGMENT_TO_LIGHT, }; @@ -767,6 +766,7 @@ public: static String get_datatype_name(DataType p_type); static bool is_token_nonvoid_datatype(TokenType p_type); static bool is_token_operator(TokenType p_type); + static bool is_token_operator_assign(TokenType p_type); static bool convert_constant(ConstantNode *p_constant, DataType p_to_type, ConstantNode::Value *p_value = nullptr); static DataType get_scalar_type(DataType p_type); @@ -876,6 +876,14 @@ private: VaryingFunctionNames varying_function_names; + struct VaryingUsage { + ShaderNode::Varying *var; + int line; + }; + List<VaryingUsage> unknown_varying_usages; + + bool _check_varying_usages(int *r_error_line, String *r_error_message) const; + TkPos _get_tkpos() { TkPos tkp; tkp.char_idx = char_idx; |