diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-11-14 19:50:31 -0200 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2018-11-14 22:50:31 +0100 |
| commit | 453543fb882c2465b771b32baa204a1c085e0ea1 (patch) | |
| tree | be635edf2b46c5b3701e6ce989627504afe3ae65 | |
| parent | 437962a65ddd9509629ae711efd80881b3f6dda9 (diff) | |
Initialize blend registers with default values (#497)
| -rw-r--r-- | Ryujinx.Graphics/Gal/GalPipelineState.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.Graphics/NvGpuEngine3d.cs | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Ryujinx.Graphics/Gal/GalPipelineState.cs b/Ryujinx.Graphics/Gal/GalPipelineState.cs index 793fb395..8630da9c 100644 --- a/Ryujinx.Graphics/Gal/GalPipelineState.cs +++ b/Ryujinx.Graphics/Gal/GalPipelineState.cs @@ -24,10 +24,10 @@ { Enabled = false, SeparateAlpha = false, - EquationRgb = 0, + EquationRgb = GalBlendEquation.FuncAdd, FuncSrcRgb = GalBlendFactor.One, FuncDstRgb = GalBlendFactor.Zero, - EquationAlpha = 0, + EquationAlpha = GalBlendEquation.FuncAdd, FuncSrcAlpha = GalBlendFactor.One, FuncDstAlpha = GalBlendFactor.Zero }; diff --git a/Ryujinx.Graphics/NvGpuEngine3d.cs b/Ryujinx.Graphics/NvGpuEngine3d.cs index f4a45347..0d748ce7 100644 --- a/Ryujinx.Graphics/NvGpuEngine3d.cs +++ b/Ryujinx.Graphics/NvGpuEngine3d.cs @@ -69,6 +69,16 @@ namespace Ryujinx.Graphics //Ensure that all components are enabled by default. //FIXME: Is this correct? WriteRegister(NvGpuEngine3dReg.ColorMaskN, 0x1111); + + for (int Index = 0; Index < GalPipelineState.RenderTargetsCount; Index++) + { + WriteRegister(NvGpuEngine3dReg.IBlendNEquationRgb + Index * 8, (int)GalBlendEquation.FuncAdd); + WriteRegister(NvGpuEngine3dReg.IBlendNFuncSrcRgb + Index * 8, (int)GalBlendFactor.One); + WriteRegister(NvGpuEngine3dReg.IBlendNFuncDstRgb + Index * 8, (int)GalBlendFactor.Zero); + WriteRegister(NvGpuEngine3dReg.IBlendNEquationAlpha + Index * 8, (int)GalBlendEquation.FuncAdd); + WriteRegister(NvGpuEngine3dReg.IBlendNFuncSrcAlpha + Index * 8, (int)GalBlendFactor.One); + WriteRegister(NvGpuEngine3dReg.IBlendNFuncDstAlpha + Index * 8, (int)GalBlendFactor.Zero); + } } public void CallMethod(NvGpuVmm Vmm, NvGpuPBEntry PBEntry) |
