Set scissors & viewports

This commit is contained in:
Isaac Marovitz 2024-03-20 14:35:19 -04:00 committed by Evan Husted
parent 65b7af6308
commit 6a67822b3b
2 changed files with 5 additions and 11 deletions

View file

@ -44,7 +44,7 @@
<PackageVersion Include="Gommon" Version="2.6.8" />
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
<PackageVersion Include="shaderc.net" Version="0.1.0" />
<PackageVersion Include="SharpMetal" Version="1.0.0-preview11" />
<PackageVersion Include="SharpMetal" Version="1.0.0-preview12" />
<PackageVersion Include="SharpZipLib" Version="1.4.2" />
<PackageVersion Include="Silk.NET.Vulkan" Version="2.21.0" />
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.21.0" />

View file

@ -521,11 +521,8 @@ namespace Ryujinx.Graphics.Metal
fixed (MTLScissorRect* pMtlScissorRects = mtlScissorRects)
{
// TODO: Fix this function which currently wont accept pointer as intended
if (_currentEncoderType == EncoderType.Render)
{
// new MTLRenderCommandEncoder(_currentEncoder.Value).SetScissorRects(pMtlScissorRects, (ulong)regions.Length);
}
var renderCommandEncoder = GetOrCreateRenderEncoder();
renderCommandEncoder.SetScissorRects((IntPtr)pMtlScissorRects, (ulong)regions.Length);
}
}
@ -670,11 +667,8 @@ namespace Ryujinx.Graphics.Metal
fixed (MTLViewport* pMtlViewports = mtlViewports)
{
// TODO: Fix this function which currently wont accept pointer as intended
if (_currentEncoderType == EncoderType.Render)
{
// new MTLRenderCommandEncoder(_currentEncoder.Value).SetViewports(pMtlViewports, (ulong)regions.Length);
}
var renderCommandEncoder = GetOrCreateRenderEncoder();
renderCommandEncoder.SetViewports((IntPtr)pMtlViewports, (ulong)viewports.Length);
}
}