Merge pull request #20681 from DavidSichma/master
Keeping track of discard
This commit is contained in:
commit
b67f982723
2 changed files with 9 additions and 0 deletions
|
@ -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 a new issue