mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-04 02:32:25 -07:00
One encoder at a time
This commit is contained in:
committed by
Isaac Marovitz
parent
e269d1605d
commit
f4aea9b7ec
27
src/Ryujinx.Graphics.Metal/RenderEncoderState.cs
Normal file
27
src/Ryujinx.Graphics.Metal/RenderEncoderState.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Ryujinx.Graphics.GAL;
|
||||
using SharpMetal.Metal;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Ryujinx.Graphics.Metal
|
||||
{
|
||||
[SupportedOSPlatform("macos")]
|
||||
struct RenderEncoderState
|
||||
{
|
||||
public MTLRenderPipelineState RenderPipelineState;
|
||||
public PrimitiveTopology Topology = PrimitiveTopology.Triangles;
|
||||
public MTLCullMode CullMode = MTLCullMode.None;
|
||||
public MTLWinding Winding = MTLWinding.Clockwise;
|
||||
|
||||
public RenderEncoderState(MTLRenderPipelineState renderPipelineState)
|
||||
{
|
||||
RenderPipelineState = renderPipelineState;
|
||||
}
|
||||
|
||||
public void SetEncoderState(MTLRenderCommandEncoder renderCommandEncoder)
|
||||
{
|
||||
renderCommandEncoder.SetRenderPipelineState(RenderPipelineState);
|
||||
renderCommandEncoder.SetCullMode(CullMode);
|
||||
renderCommandEncoder.SetFrontFacingWinding(Winding);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user