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

set the inline state after restoring state

This commit is contained in:
Samuliak 2024-05-24 16:40:01 +02:00 committed by Isaac Marovitz
parent f08d6c1cad
commit be9f5dcf69

View file

@ -45,6 +45,17 @@ namespace Ryujinx.Graphics.Metal
{
_currentState = _backStates[_backStates.Count - 1];
_backStates.RemoveAt(_backStates.Count - 1);
// Set all the inline state, since it might have changed
var renderCommandEncoder = _pipeline.GetOrCreateRenderEncoder();
SetDepthClamp(renderCommandEncoder);
SetScissors(renderCommandEncoder);
SetViewports(renderCommandEncoder);
SetVertexBuffers(renderCommandEncoder, _currentState.VertexBuffers);
SetBuffers(renderCommandEncoder, _currentState.UniformBuffers, true);
SetBuffers(renderCommandEncoder, _currentState.StorageBuffers, true);
SetCullMode(renderCommandEncoder);
SetFrontFace(renderCommandEncoder);
} else
{
Logger.Error?.Print(LogClass.Gpu, "No state to restore");