mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 02:53:04 +00:00
Rasterizer Discard + Multisample State
This commit is contained in:
parent
6e3aaa6360
commit
bdb00f3981
3 changed files with 20 additions and 8 deletions
|
@ -399,6 +399,13 @@ namespace Ryujinx.Graphics.Metal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public readonly void UpdateRasterizerDiscard(bool discard)
|
||||||
|
{
|
||||||
|
_currentState.Pipeline.RasterizerDiscardEnable = discard;
|
||||||
|
|
||||||
|
SignalDirty(DirtyFlags.RenderPipeline);
|
||||||
|
}
|
||||||
|
|
||||||
public readonly void UpdateRenderTargets(ITexture[] colors, ITexture depthStencil)
|
public readonly void UpdateRenderTargets(ITexture[] colors, ITexture depthStencil)
|
||||||
{
|
{
|
||||||
_currentState.FramebufferUsingColorWriteMask = false;
|
_currentState.FramebufferUsingColorWriteMask = false;
|
||||||
|
@ -656,6 +663,14 @@ namespace Ryujinx.Graphics.Metal
|
||||||
SignalDirty(DirtyFlags.DepthBias);
|
SignalDirty(DirtyFlags.DepthBias);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public readonly void UpdateMultisampleState(MultisampleDescriptor multisample)
|
||||||
|
{
|
||||||
|
_currentState.Pipeline.AlphaToCoverageEnable = multisample.AlphaToCoverageEnable;
|
||||||
|
_currentState.Pipeline.AlphaToOneEnable = multisample.AlphaToOneEnable;
|
||||||
|
|
||||||
|
SignalDirty(DirtyFlags.RenderPipeline);
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateScissors(ReadOnlySpan<Rectangle<int>> regions)
|
public void UpdateScissors(ReadOnlySpan<Rectangle<int>> regions)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < regions.Length; i++)
|
for (int i = 0; i < regions.Length; i++)
|
||||||
|
|
|
@ -597,7 +597,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
|
|
||||||
public void SetMultisampleState(MultisampleDescriptor multisample)
|
public void SetMultisampleState(MultisampleDescriptor multisample)
|
||||||
{
|
{
|
||||||
Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
|
_encoderStateManager.UpdateMultisampleState(multisample);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
|
public void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
|
||||||
|
@ -638,7 +638,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
|
|
||||||
public void SetRasterizerDiscard(bool discard)
|
public void SetRasterizerDiscard(bool discard)
|
||||||
{
|
{
|
||||||
Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
|
_encoderStateManager.UpdateRasterizerDiscard(discard);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask)
|
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask)
|
||||||
|
|
|
@ -208,12 +208,9 @@ namespace Ryujinx.Graphics.Metal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: enable when sharpmetal fixes the bindings
|
renderPipelineDescriptor.SetAlphaToCoverageEnabled(AlphaToCoverageEnable);
|
||||||
renderPipelineDescriptor.AlphaToCoverageEnabled = AlphaToCoverageEnable;
|
renderPipelineDescriptor.SetAlphaToOneEnabled(AlphaToOneEnable);
|
||||||
renderPipelineDescriptor.AlphaToOneEnabled = AlphaToOneEnable;
|
renderPipelineDescriptor.SetRasterizationEnabled(!RasterizerDiscardEnable);
|
||||||
renderPipelineDescriptor.RasterizationEnabled = !RasterizerDiscardEnable;
|
|
||||||
*/
|
|
||||||
|
|
||||||
renderPipelineDescriptor.SampleCount = Math.Max(1, SamplesCount);
|
renderPipelineDescriptor.SampleCount = Math.Max(1, SamplesCount);
|
||||||
|
|
||||||
var vertexDescriptor = BuildVertexDescriptor();
|
var vertexDescriptor = BuildVertexDescriptor();
|
||||||
|
|
Loading…
Reference in a new issue