mirror of
https://github.com/hedge-dev/XenosRecomp.git
synced 2025-10-30 07:12:17 +00:00
Fix kill instructions.
This commit is contained in:
parent
ab277869d4
commit
96458eb7bc
1 changed files with 5 additions and 5 deletions
|
|
@ -540,22 +540,22 @@ void ShaderRecompiler::recompile(const AluInstruction& instr)
|
|||
{
|
||||
case AluVectorOpcode::KillEq:
|
||||
indent();
|
||||
println("clip(any({} == {}) ? 1 : -1);", op(VECTOR_0), op(VECTOR_1));
|
||||
println("clip(any({} == {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::KillGt:
|
||||
indent();
|
||||
println("clip(any({} > {}) ? 1 : -1);", op(VECTOR_0), op(VECTOR_1));
|
||||
println("clip(any({} > {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::KillGe:
|
||||
indent();
|
||||
println("clip(any({} >= {}) ? 1 : -1);", op(VECTOR_0), op(VECTOR_1));
|
||||
println("clip(any({} >= {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::KillNe:
|
||||
indent();
|
||||
println("clip(any({} != {}) ? 1 : -1);", op(VECTOR_0), op(VECTOR_1));
|
||||
println("clip(any({} != {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1062,7 +1062,7 @@ void ShaderRecompiler::recompile(const AluInstruction& instr)
|
|||
if (instr.scalarOpcode >= AluScalarOpcode::KillsEq && instr.scalarOpcode <= AluScalarOpcode::KillsOne)
|
||||
{
|
||||
indent();
|
||||
out += "clip(ps != 0.0 ? 1 : -1);\n";
|
||||
out += "clip(ps != 0.0 ? -1 : 1);\n";
|
||||
}
|
||||
|
||||
if (closeIfBracket)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue