From 8eba42447fa8f610c6d90f349629dcecde167db2 Mon Sep 17 00:00:00 2001 From: Samuliak Date: Fri, 24 May 2024 15:52:17 +0200 Subject: [PATCH] fix: incorrect merge stuff --- Directory.Packages.props | 4 --- src/Ryujinx.Graphics.Metal/Pipeline.cs | 44 ++------------------------ 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index afef0d7ff..70404ef8e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -38,11 +38,7 @@ -<<<<<<< HEAD -======= - ->>>>>>> 3eab14be7 (Set scissors & viewports) diff --git a/src/Ryujinx.Graphics.Metal/Pipeline.cs b/src/Ryujinx.Graphics.Metal/Pipeline.cs index 3d9e108a1..2f11de985 100644 --- a/src/Ryujinx.Graphics.Metal/Pipeline.cs +++ b/src/Ryujinx.Graphics.Metal/Pipeline.cs @@ -445,26 +445,7 @@ namespace Ryujinx.Graphics.Metal public void SetScissors(ReadOnlySpan> regions) { - // TODO: Test max allowed scissor rects on device - 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); - } + _encoderStateManager.UpdateScissors(regions); } public void SetStencilTest(StencilTestDescriptor stencilTest) @@ -532,28 +513,7 @@ namespace Ryujinx.Graphics.Metal public void SetViewports(ReadOnlySpan viewports) { - // TODO: Test max allowed viewports on device - 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); - } + _encoderStateManager.UpdateViewports(viewports); } public void TextureBarrier()