0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 23:55:47 +00:00

Use return value of BeginRenderPass

This commit is contained in:
Isaac Marovitz 2024-05-19 11:07:55 -04:00 committed by Isaac Marovitz
parent 684e025d61
commit f2490347af

View file

@ -48,12 +48,16 @@ namespace Ryujinx.Graphics.Metal
public MTLRenderCommandEncoder GetOrCreateRenderEncoder()
{
MTLRenderCommandEncoder renderCommandEncoder;
if (_currentEncoder == null || _currentEncoderType != EncoderType.Render)
{
BeginRenderPass();
renderCommandEncoder = BeginRenderPass();
}
else
{
renderCommandEncoder = new MTLRenderCommandEncoder(_currentEncoder.Value);
}
var renderCommandEncoder = new MTLRenderCommandEncoder(_currentEncoder.Value);
_encoderStateManager.RebindState(renderCommandEncoder);