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
This commit is contained in:
parent
e99e6d0ad1
commit
468d8f841f
9 changed files with 66 additions and 18 deletions
|
@ -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,
|
||||
|
@ -211,6 +216,16 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
CommitBindings();
|
||||
}
|
||||
|
||||
/// <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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue