aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/State
diff options
context:
space:
mode:
authormageven <62494521+mageven@users.noreply.github.com>2020-04-07 14:49:45 +0530
committerGitHub <noreply@github.com>2020-04-07 19:19:45 +1000
commit468d8f841ffcbebf4130371eb64ab04165bce3e9 (patch)
treecc3dd0cf370f7ae3d80720a4324baf954560a8d4 /Ryujinx.Graphics.Gpu/State
parente99e6d0ad1fb0e0245469a67526de2dc03bc0658 (diff)
Simple GPU fixes (#1093)
* Implement RasterizeEnable * Match viewport count to hardware * Simplify ScissorTest tracking around Blits * Disable RasterizerDiscard around Blits and track its state * Read RasterizeEnable reg as bool and add doc
Diffstat (limited to 'Ryujinx.Graphics.Gpu/State')
-rw-r--r--Ryujinx.Graphics.Gpu/State/GpuState.cs3
-rw-r--r--Ryujinx.Graphics.Gpu/State/GpuStateTable.cs6
-rw-r--r--Ryujinx.Graphics.Gpu/State/MethodOffset.cs1
3 files changed, 7 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Gpu/State/GpuState.cs b/Ryujinx.Graphics.Gpu/State/GpuState.cs
index de09f3e7..4b81029c 100644
--- a/Ryujinx.Graphics.Gpu/State/GpuState.cs
+++ b/Ryujinx.Graphics.Gpu/State/GpuState.cs
@@ -117,6 +117,9 @@ namespace Ryujinx.Graphics.Gpu.State
/// </summary>
private void InitializeDefaultState()
{
+ // Enable Rasterizer
+ _backingMemory[(int)MethodOffset.RasterizeEnable] = 1;
+
// Depth ranges.
for (int index = 0; index < 8; index++)
{
diff --git a/Ryujinx.Graphics.Gpu/State/GpuStateTable.cs b/Ryujinx.Graphics.Gpu/State/GpuStateTable.cs
index 8631efcc..e59a3aaf 100644
--- a/Ryujinx.Graphics.Gpu/State/GpuStateTable.cs
+++ b/Ryujinx.Graphics.Gpu/State/GpuStateTable.cs
@@ -53,11 +53,11 @@ namespace Ryujinx.Graphics.Gpu.State
public static TableItem[] Table = new TableItem[]
{
new TableItem(MethodOffset.RtColorState, typeof(RtColorState), 8),
- new TableItem(MethodOffset.ViewportTransform, typeof(ViewportTransform), 8),
- new TableItem(MethodOffset.ViewportExtents, typeof(ViewportExtents), 8),
+ new TableItem(MethodOffset.ViewportTransform, typeof(ViewportTransform), Constants.TotalViewports),
+ new TableItem(MethodOffset.ViewportExtents, typeof(ViewportExtents), Constants.TotalViewports),
new TableItem(MethodOffset.VertexBufferDrawState, typeof(VertexBufferDrawState), 1),
new TableItem(MethodOffset.DepthBiasState, typeof(DepthBiasState), 1),
- new TableItem(MethodOffset.ScissorState, typeof(ScissorState), 8),
+ new TableItem(MethodOffset.ScissorState, typeof(ScissorState), Constants.TotalViewports),
new TableItem(MethodOffset.StencilBackMasks, typeof(StencilBackMasks), 1),
new TableItem(MethodOffset.RtDepthStencilState, typeof(RtDepthStencilState), 1),
new TableItem(MethodOffset.VertexAttribState, typeof(VertexAttribState), 16),
diff --git a/Ryujinx.Graphics.Gpu/State/MethodOffset.cs b/Ryujinx.Graphics.Gpu/State/MethodOffset.cs
index 0a720b2c..a178c2f8 100644
--- a/Ryujinx.Graphics.Gpu/State/MethodOffset.cs
+++ b/Ryujinx.Graphics.Gpu/State/MethodOffset.cs
@@ -16,6 +16,7 @@ namespace Ryujinx.Graphics.Gpu.State
DispatchParamsAddress = 0xad,
Dispatch = 0xaf,
CopyBuffer = 0xc0,
+ RasterizeEnable = 0xdf,
CopyBufferParams = 0x100,
CopyBufferSwizzle = 0x1c2,
CopyBufferDstTexture = 0x1c3,