mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Merge pull request #20681 from DavidSichma/master
Keeping track of discard
This commit is contained in:
commit
b67f982723
@ -704,6 +704,10 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener
|
||||
}
|
||||
code += ";\n";
|
||||
} else if (cf_node->flow_op == SL::FLOW_OP_DISCARD) {
|
||||
if (p_actions.usage_flag_pointers.has("DISCARD") && !used_flag_pointers.has("DISCARD")) {
|
||||
*p_actions.usage_flag_pointers["DISCARD"] = true;
|
||||
used_flag_pointers.insert("DISCARD");
|
||||
}
|
||||
code += "discard;";
|
||||
} else if (cf_node->flow_op == SL::FLOW_OP_CONTINUE) {
|
||||
code += "continue;";
|
||||
|
@ -702,6 +702,11 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
|
||||
}
|
||||
} else if (cfnode->flow_op == SL::FLOW_OP_DISCARD) {
|
||||
|
||||
if (p_actions.usage_flag_pointers.has("DISCARD") && !used_flag_pointers.has("DISCARD")) {
|
||||
*p_actions.usage_flag_pointers["DISCARD"] = true;
|
||||
used_flag_pointers.insert("DISCARD");
|
||||
}
|
||||
|
||||
code = "discard;";
|
||||
} else if (cfnode->flow_op == SL::FLOW_OP_CONTINUE) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user