mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
fix: incorrect roundEven implementation
This commit is contained in:
parent
0bb99aaa75
commit
be98734358
@ -1231,8 +1231,7 @@ static void _emitALUOP2InstructionCode(LatteDecompilerShaderContext* shaderConte
|
||||
_emitInstructionOutputVariableName(shaderContext, aluInstruction);
|
||||
src->add(" = ");
|
||||
_emitTypeConversionPrefixMSL(shaderContext, LATTE_DECOMPILER_DTYPE_FLOAT, outputType);
|
||||
src->add("roundEven");
|
||||
src->add("(");
|
||||
src->add("rint(");
|
||||
_emitOperandInputCode(shaderContext, aluInstruction, 0, LATTE_DECOMPILER_DTYPE_FLOAT);
|
||||
src->add(")");
|
||||
_emitTypeConversionSuffixMSL(shaderContext, LATTE_DECOMPILER_DTYPE_FLOAT, outputType);
|
||||
@ -3725,12 +3724,6 @@ void LatteDecompiler_emitHelperFunctions(LatteDecompilerShaderContext* shaderCon
|
||||
"return as_type<int>(clamp(as_type<float>(v), 0.0, 1.0));\r\n"
|
||||
"}\r\n");
|
||||
|
||||
// round even
|
||||
fCStr_shaderSource->add(""
|
||||
"float roundEven(float x) {\r\n"
|
||||
"return round(x / 2.0) * 2.0;\r\n"
|
||||
"}\r\n");
|
||||
|
||||
// Bit cast
|
||||
|
||||
// Scalar
|
||||
|
Loading…
Reference in New Issue
Block a user