Add support for custom line widths (#2406)
This commit is contained in:
parent
493648df31
commit
fefd4619a5
4 changed files with 36 additions and 1 deletions
|
@ -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,
|
||||
|
@ -716,6 +721,18 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
_context.Renderer.Pipeline.SetVertexAttribs(vertexAttribs);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue