shader_ir: Separate float-point comparisons in ordered and unordered

This allows us to use native SPIR-V instructions without having to
manually check for NAN.
This commit is contained in:
ReinUsesLisp
2020-05-09 04:55:15 -03:00
parent 1121960f0e
commit 4e57f9d5cf
7 changed files with 163 additions and 135 deletions

View File

@ -255,7 +255,7 @@ void ShaderIR::InsertControlFlow(NodeBlock& bb, const ShaderBlock& block) {
Node n = Operation(OperationCode::Branch, Immediate(branch_case.address));
Node op_b = Immediate(branch_case.cmp_value);
Node condition =
GetPredicateComparisonInteger(Tegra::Shader::PredCondition::Equal, false, op_a, op_b);
GetPredicateComparisonInteger(Tegra::Shader::PredCondition::EQ, false, op_a, op_b);
auto result = Conditional(condition, {n});
bb.push_back(result);
global_code.push_back(result);