From 57a173a67127ba908bbf893e03af639a91c623f8 Mon Sep 17 00:00:00 2001 From: Samuliak Date: Sat, 25 May 2024 08:39:45 +0200 Subject: [PATCH] reset viewport before blit --- src/Ryujinx.Graphics.Metal/EncoderStateManager.cs | 5 ----- src/Ryujinx.Graphics.Metal/HelperShader.cs | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs index 688f0077b..d725fd8de 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs @@ -416,11 +416,6 @@ namespace Ryujinx.Graphics.Metal { int maxScissors = Math.Min(regions.Length, _currentState.Viewports.Length); - if (maxScissors == 0) - { - return; - } - _currentState.Scissors = new MTLScissorRect[maxScissors]; for (int i = 0; i < maxScissors; i++) diff --git a/src/Ryujinx.Graphics.Metal/HelperShader.cs b/src/Ryujinx.Graphics.Metal/HelperShader.cs index 7ff839418..99ef00b2c 100644 --- a/src/Ryujinx.Graphics.Metal/HelperShader.cs +++ b/src/Ryujinx.Graphics.Metal/HelperShader.cs @@ -74,8 +74,8 @@ namespace Ryujinx.Graphics.Metal _pipeline.SetProgram(_programColorBlit); // Viewport and scissor needs to be set before render pass begin so as not to bind the old ones - //_pipeline.SetViewports([]); - //_pipeline.SetScissors([]); + _pipeline.SetViewports([]); + _pipeline.SetScissors([]); _pipeline.SetRenderTargets([destination], null); _pipeline.SetTextureAndSampler(ShaderStage.Fragment, 0, source, new Sampler(sampler)); _pipeline.SetPrimitiveTopology(PrimitiveTopology.Triangles);