diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-06-25 20:11:54 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-25 20:11:54 -0300 |
| commit | fefd4619a5347b4ef86314a4e17e1d6e63ced297 (patch) | |
| tree | 52561237c2c4abf60f9e6918f26d396552c42168 /Ryujinx.Graphics.Gpu/Engine/Methods.cs | |
| parent | 493648df312b7501b0560a3c94b2deffab2e99cf (diff) | |
Add support for custom line widths (#2406)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index 39b3d13c..96741cd6 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -223,12 +223,17 @@ namespace Ryujinx.Graphics.Gpu.Engine UpdateTexturePoolState(state); } - // Input assembler state. + // Rasterizer state. if (state.QueryModified(MethodOffset.VertexAttribState)) { UpdateVertexAttribState(state); } + if (state.QueryModified(MethodOffset.LineWidthSmooth, MethodOffset.LineSmoothEnable)) + { + UpdateLineState(state); + } + if (state.QueryModified(MethodOffset.PointSize, MethodOffset.VertexProgramPointSize, MethodOffset.PointSpriteEnable, @@ -717,6 +722,18 @@ namespace Ryujinx.Graphics.Gpu.Engine } /// <summary> + /// Updates host line width based on guest GPU state. + /// </summary> + /// <param name="state">Current GPU state</param> + private void UpdateLineState(GpuState state) + { + float width = state.Get<float>(MethodOffset.LineWidthSmooth); + bool smooth = state.Get<Boolean32>(MethodOffset.LineSmoothEnable); + + _context.Renderer.Pipeline.SetLineParameters(width, smooth); + } + + /// <summary> /// Updates host point size based on guest GPU state. /// </summary> /// <param name="state">Current GPU state</param> |
