1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-27 06:52:03 +00:00

Initialize blend registers with default values (#497)

This commit is contained in:
gdkchan 2018-11-14 19:50:31 -02:00 committed by Ac_K
parent 437962a65d
commit 453543fb88
2 changed files with 12 additions and 2 deletions

View file

@ -24,10 +24,10 @@
{ {
Enabled = false, Enabled = false,
SeparateAlpha = false, SeparateAlpha = false,
EquationRgb = 0, EquationRgb = GalBlendEquation.FuncAdd,
FuncSrcRgb = GalBlendFactor.One, FuncSrcRgb = GalBlendFactor.One,
FuncDstRgb = GalBlendFactor.Zero, FuncDstRgb = GalBlendFactor.Zero,
EquationAlpha = 0, EquationAlpha = GalBlendEquation.FuncAdd,
FuncSrcAlpha = GalBlendFactor.One, FuncSrcAlpha = GalBlendFactor.One,
FuncDstAlpha = GalBlendFactor.Zero FuncDstAlpha = GalBlendFactor.Zero
}; };

View file

@ -69,6 +69,16 @@ namespace Ryujinx.Graphics
//Ensure that all components are enabled by default. //Ensure that all components are enabled by default.
//FIXME: Is this correct? //FIXME: Is this correct?
WriteRegister(NvGpuEngine3dReg.ColorMaskN, 0x1111); 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) public void CallMethod(NvGpuVmm Vmm, NvGpuPBEntry PBEntry)