1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-24 06:56:01 +00:00

fix: incorrect merge stuff

This commit is contained in:
Samuliak 2024-05-24 15:52:17 +02:00 committed by Isaac Marovitz
parent 3ec45f73f4
commit 8eba42447f
2 changed files with 2 additions and 46 deletions

View file

@ -38,11 +38,7 @@
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" /> <PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" />
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" /> <PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
<PackageVersion Include="shaderc.net" Version="0.1.0" /> <PackageVersion Include="shaderc.net" Version="0.1.0" />
<<<<<<< HEAD
<PackageVersion Include="SharpMetal" Version="1.0.0-preview14" /> <PackageVersion Include="SharpMetal" Version="1.0.0-preview14" />
=======
<PackageVersion Include="SharpMetal" Version="1.0.0-preview12" />
>>>>>>> 3eab14be7 (Set scissors & viewports)
<PackageVersion Include="SharpZipLib" Version="1.4.2" /> <PackageVersion Include="SharpZipLib" Version="1.4.2" />
<PackageVersion Include="Silk.NET.Vulkan" Version="2.21.0" /> <PackageVersion Include="Silk.NET.Vulkan" Version="2.21.0" />
<PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.21.0" /> <PackageVersion Include="Silk.NET.Vulkan.Extensions.EXT" Version="2.21.0" />

View file

@ -445,26 +445,7 @@ namespace Ryujinx.Graphics.Metal
public void SetScissors(ReadOnlySpan<Rectangle<int>> regions) public void SetScissors(ReadOnlySpan<Rectangle<int>> regions)
{ {
// TODO: Test max allowed scissor rects on device _encoderStateManager.UpdateScissors(regions);
var mtlScissorRects = new MTLScissorRect[regions.Length];
for (int i = 0; i < regions.Length; i++)
{
var region = regions[i];
mtlScissorRects[i] = new MTLScissorRect
{
height = (ulong)region.Height,
width = (ulong)region.Width,
x = (ulong)region.X,
y = (ulong)region.Y
};
}
fixed (MTLScissorRect* pMtlScissorRects = mtlScissorRects)
{
var renderCommandEncoder = GetOrCreateRenderEncoder();
renderCommandEncoder.SetScissorRects((IntPtr)pMtlScissorRects, (ulong)regions.Length);
}
} }
public void SetStencilTest(StencilTestDescriptor stencilTest) public void SetStencilTest(StencilTestDescriptor stencilTest)
@ -532,28 +513,7 @@ namespace Ryujinx.Graphics.Metal
public void SetViewports(ReadOnlySpan<Viewport> viewports) public void SetViewports(ReadOnlySpan<Viewport> viewports)
{ {
// TODO: Test max allowed viewports on device _encoderStateManager.UpdateViewports(viewports);
var mtlViewports = new MTLViewport[viewports.Length];
for (int i = 0; i < viewports.Length; i++)
{
var viewport = viewports[i];
mtlViewports[i] = new MTLViewport
{
originX = viewport.Region.X,
originY = viewport.Region.Y,
width = viewport.Region.Width,
height = viewport.Region.Height,
znear = viewport.DepthNear,
zfar = viewport.DepthFar
};
}
fixed (MTLViewport* pMtlViewports = mtlViewports)
{
var renderCommandEncoder = GetOrCreateRenderEncoder();
renderCommandEncoder.SetViewports((IntPtr)pMtlViewports, (ulong)viewports.Length);
}
} }
public void TextureBarrier() public void TextureBarrier()