Skip to content

Commit

Permalink
Merge pull request godotengine#59774 from Chaosus/shader_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaosus authored Apr 1, 2022
2 parents 1ec40a9 + d47035a commit 9c5818d
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5134,9 +5134,13 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
} else if (tk.type == TK_PERIOD) {
completion_class = TAG_ARRAY;
p_block->block_tag = SubClassTag::TAG_ARRAY;
if (p_block != nullptr) {
p_block->block_tag = SubClassTag::TAG_ARRAY;
}
call_expression = _parse_and_reduce_expression(p_block, p_function_info);
p_block->block_tag = SubClassTag::TAG_GLOBAL;
if (p_block != nullptr) {
p_block->block_tag = SubClassTag::TAG_GLOBAL;
}
if (!call_expression) {
return nullptr;
}
Expand Down Expand Up @@ -5287,9 +5291,13 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons

if (!expr->is_indexed() && expr->get_array_size() > 0) {
completion_class = TAG_ARRAY;
p_block->block_tag = SubClassTag::TAG_ARRAY;
if (p_block != nullptr) {
p_block->block_tag = SubClassTag::TAG_ARRAY;
}
Node *call_expression = _parse_and_reduce_expression(p_block, p_function_info);
p_block->block_tag = SubClassTag::TAG_GLOBAL;
if (p_block != nullptr) {
p_block->block_tag = SubClassTag::TAG_GLOBAL;
}
if (!call_expression) {
return nullptr;
}
Expand Down Expand Up @@ -5587,9 +5595,13 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
mn->assign_expression = assign_expression;
} else if (tk.type == TK_PERIOD) {
completion_class = TAG_ARRAY;
p_block->block_tag = SubClassTag::TAG_ARRAY;
if (p_block != nullptr) {
p_block->block_tag = SubClassTag::TAG_ARRAY;
}
Node *call_expression = _parse_and_reduce_expression(p_block, p_function_info);
p_block->block_tag = SubClassTag::TAG_GLOBAL;
if (p_block != nullptr) {
p_block->block_tag = SubClassTag::TAG_GLOBAL;
}
if (!call_expression) {
return nullptr;
}
Expand Down

0 comments on commit 9c5818d

Please sign in to comment.