2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #2109 from FernandoS27/fix-f2i

Corrected F2I None mode to RoundEven.
This commit is contained in:
bunnei 2019-02-12 10:20:29 -05:00 committed by GitHub
commit c1accfefde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -186,7 +186,7 @@ enum class SubOp : u64 {
}; };
enum class F2iRoundingOp : u64 { enum class F2iRoundingOp : u64 {
None = 0, RoundEven = 0,
Floor = 1, Floor = 1,
Ceil = 2, Ceil = 2,
Trunc = 3, Trunc = 3,

View file

@ -118,8 +118,8 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) {
value = [&]() { value = [&]() {
switch (instr.conversion.f2i.rounding) { switch (instr.conversion.f2i.rounding) {
case Tegra::Shader::F2iRoundingOp::None: case Tegra::Shader::F2iRoundingOp::RoundEven:
return value; return Operation(OperationCode::FRoundEven, PRECISE, value);
case Tegra::Shader::F2iRoundingOp::Floor: case Tegra::Shader::F2iRoundingOp::Floor:
return Operation(OperationCode::FFloor, PRECISE, value); return Operation(OperationCode::FFloor, PRECISE, value);
case Tegra::Shader::F2iRoundingOp::Ceil: case Tegra::Shader::F2iRoundingOp::Ceil: