diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/State')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/State/GpuState.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/State/MethodOffset.cs | 3 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/State/RtControl.cs | 17 |
3 files changed, 27 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/State/GpuState.cs b/Ryujinx.Graphics.Gpu/State/GpuState.cs index 13f777c9..509f6715 100644 --- a/Ryujinx.Graphics.Gpu/State/GpuState.cs +++ b/Ryujinx.Graphics.Gpu/State/GpuState.cs @@ -94,11 +94,17 @@ namespace Ryujinx.Graphics.Gpu.State _backingMemory[(int)MethodOffset.ViewportExtents + index * 4 + 3] = 0x3F800000; } + // Viewport transform enable. + _backingMemory[(int)MethodOffset.ViewportTransformEnable] = 1; + // Default front stencil mask. _backingMemory[0x4e7] = 0xff; // Default color mask. - _backingMemory[(int)MethodOffset.RtColorMask] = 0x1111; + for (int index = 0; index < Constants.TotalRenderTargets; index++) + { + _backingMemory[(int)MethodOffset.RtColorMask + index] = 0x1111; + } } public void RegisterCallback(MethodOffset offset, int count, MethodCallback callback) diff --git a/Ryujinx.Graphics.Gpu/State/MethodOffset.cs b/Ryujinx.Graphics.Gpu/State/MethodOffset.cs index a560c257..93cd6f06 100644 --- a/Ryujinx.Graphics.Gpu/State/MethodOffset.cs +++ b/Ryujinx.Graphics.Gpu/State/MethodOffset.cs @@ -29,8 +29,10 @@ namespace Ryujinx.Graphics.Gpu.State StencilBackMasks = 0x3d5, InvalidateTextures = 0x3dd, TextureBarrierTiled = 0x3df, + RtColorMaskShared = 0x3e4, RtDepthStencilState = 0x3f8, VertexAttribState = 0x458, + RtControl = 0x487, RtDepthStencilSize = 0x48a, SamplerIndex = 0x48d, DepthTestEnable = 0x4b3, @@ -62,6 +64,7 @@ namespace Ryujinx.Graphics.Gpu.State DepthBiasClamp = 0x61f, VertexBufferInstanced = 0x620, FaceState = 0x646, + ViewportTransformEnable = 0x64b, Clear = 0x674, RtColorMask = 0x680, ReportState = 0x6c0, diff --git a/Ryujinx.Graphics.Gpu/State/RtControl.cs b/Ryujinx.Graphics.Gpu/State/RtControl.cs new file mode 100644 index 00000000..4c6fbc34 --- /dev/null +++ b/Ryujinx.Graphics.Gpu/State/RtControl.cs @@ -0,0 +1,17 @@ +namespace Ryujinx.Graphics.Gpu.State +{ + struct RtControl + { + public uint Packed; + + public int UnpackCount() + { + return (int)(Packed & 0xf); + } + + public int UnpackPermutationIndex(int index) + { + return (int)((Packed >> (4 + index * 3)) & 7); + } + } +} |
