mirror of
https://github.com/godotengine/godot.git
synced 2024-11-12 23:24:26 +00:00
Merge pull request #31525 from Chaosus/vk_shaders_do2
[Vulkan] Implemented do/while loops for shaders
This commit is contained in:
commit
b129f8d06d
@ -752,6 +752,10 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
|
||||
code += _mktab(p_level) + "else\n";
|
||||
code += _dump_node_code(cfnode->blocks[1], p_level + 1, r_gen_code, p_actions, p_default_actions, p_assigning);
|
||||
}
|
||||
} else if (cfnode->flow_op == SL::FLOW_OP_DO) {
|
||||
code += _mktab(p_level) + "do";
|
||||
code += _dump_node_code(cfnode->blocks[0], p_level + 1, r_gen_code, p_actions, p_default_actions, p_assigning);
|
||||
code += _mktab(p_level) + "while (" + _dump_node_code(cfnode->expressions[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning) + ");";
|
||||
} else if (cfnode->flow_op == SL::FLOW_OP_WHILE) {
|
||||
|
||||
code += _mktab(p_level) + "while (" + _dump_node_code(cfnode->expressions[0], p_level, r_gen_code, p_actions, p_default_actions, p_assigning) + ")\n";
|
||||
|
Loading…
Reference in New Issue
Block a user