diff options
author | mageven <62494521+mageven@users.noreply.github.com> | 2020-04-25 18:30:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 23:00:43 +1000 |
commit | a728610b4016e153fed670eddaa45909ab51f18b (patch) | |
tree | e29a3a2e35b64b255fa5829af30437a9e15bc16d /Ryujinx.Graphics.Gpu/Engine/Methods.cs | |
parent | 75ec30c962bcfa4251f29a29c659b959170018ce (diff) |
Implement Constant Color blends (#1119)
* Implement Constant Color blends and init blend states
* Address gdkchan's comments
Also adds Set methods to GpuState
* Fix descriptions of QueryModified
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index 2e6c9828..7bc85018 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -229,6 +229,7 @@ namespace Ryujinx.Graphics.Gpu.Engine } if (state.QueryModified(MethodOffset.BlendIndependent, + MethodOffset.BlendConstant, MethodOffset.BlendStateCommon, MethodOffset.BlendEnableCommon, MethodOffset.BlendEnable, @@ -749,8 +750,9 @@ namespace Ryujinx.Graphics.Gpu.Engine private void UpdateBlendState(GpuState state) { bool blendIndependent = state.Get<Boolean32>(MethodOffset.BlendIndependent); + ColorF blendConstant = state.Get<ColorF>(MethodOffset.BlendConstant); - for (int index = 0; index < 8; index++) + for (int index = 0; index < Constants.TotalRenderTargets; index++) { BlendDescriptor descriptor; @@ -761,6 +763,7 @@ namespace Ryujinx.Graphics.Gpu.Engine descriptor = new BlendDescriptor( enable, + blendConstant, blend.ColorOp, blend.ColorSrcFactor, blend.ColorDstFactor, @@ -775,6 +778,7 @@ namespace Ryujinx.Graphics.Gpu.Engine descriptor = new BlendDescriptor( enable, + blendConstant, blend.ColorOp, blend.ColorSrcFactor, blend.ColorDstFactor, |