From 329ba5b39b4402d96aea85f1e97dc35f70aadfab Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 13 Oct 2020 00:45:41 -0300 Subject: [PATCH] Fix incorrect GPU GL blend func values (#1612) --- Ryujinx.Graphics.GAL/BlendOp.cs | 8 ++++---- Ryujinx.Graphics.OpenGL/EnumConversion.cs | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Ryujinx.Graphics.GAL/BlendOp.cs b/Ryujinx.Graphics.GAL/BlendOp.cs index de1ab67d..b4a5a930 100644 --- a/Ryujinx.Graphics.GAL/BlendOp.cs +++ b/Ryujinx.Graphics.GAL/BlendOp.cs @@ -9,9 +9,9 @@ namespace Ryujinx.Graphics.GAL Maximum, AddGl = 0x8006, - SubtractGl = 0x8007, - ReverseSubtractGl = 0x8008, - MinimumGl = 0x800a, - MaximumGl = 0x800b + MinimumGl = 0x8007, + MaximumGl = 0x8008, + SubtractGl = 0x800a, + ReverseSubtractGl = 0x800b } } diff --git a/Ryujinx.Graphics.OpenGL/EnumConversion.cs b/Ryujinx.Graphics.OpenGL/EnumConversion.cs index 97fa9e2c..cc3db003 100644 --- a/Ryujinx.Graphics.OpenGL/EnumConversion.cs +++ b/Ryujinx.Graphics.OpenGL/EnumConversion.cs @@ -104,18 +104,18 @@ namespace Ryujinx.Graphics.OpenGL case BlendOp.Add: case BlendOp.AddGl: return BlendEquationMode.FuncAdd; - case BlendOp.Subtract: - case BlendOp.SubtractGl: - return BlendEquationMode.FuncSubtract; - case BlendOp.ReverseSubtract: - case BlendOp.ReverseSubtractGl: - return BlendEquationMode.FuncReverseSubtract; case BlendOp.Minimum: case BlendOp.MinimumGl: return BlendEquationMode.Min; case BlendOp.Maximum: case BlendOp.MaximumGl: return BlendEquationMode.Max; + case BlendOp.Subtract: + case BlendOp.SubtractGl: + return BlendEquationMode.FuncSubtract; + case BlendOp.ReverseSubtract: + case BlendOp.ReverseSubtractGl: + return BlendEquationMode.FuncReverseSubtract; } Logger.Debug?.Print(LogClass.Gpu, $"Invalid {nameof(BlendOp)} enum value: {op}.");