aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Methods.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs
index 18720440..50913801 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs
@@ -108,6 +108,11 @@ namespace Ryujinx.Graphics.Gpu.Engine
UpdateShaderState(state);
}
+ if (state.QueryModified(MethodOffset.RasterizeEnable))
+ {
+ UpdateRasterizerState(state);
+ }
+
if (state.QueryModified(MethodOffset.RtColorState,
MethodOffset.RtDepthStencilState,
MethodOffset.RtControl,
@@ -212,6 +217,16 @@ namespace Ryujinx.Graphics.Gpu.Engine
}
/// <summary>
+ /// Updates Rasterizer primitive discard state based on guest gpu state.
+ /// </summary>
+ /// <param name="state">Current GPU state</param>
+ private void UpdateRasterizerState(GpuState state)
+ {
+ Boolean32 enable = state.Get<Boolean32>(MethodOffset.RasterizeEnable);
+ _context.Renderer.Pipeline.SetRasterizerDiscard(!enable);
+ }
+
+ /// <summary>
/// Ensures that the bindings are visible to the host GPU.
/// Note: this actually performs the binding using the host graphics API.
/// </summary>