0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 04:35:46 +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() public MTLRenderCommandEncoder GetOrCreateRenderEncoder()
{ {
MTLRenderCommandEncoder renderCommandEncoder;
if (_currentEncoder == null || _currentEncoderType != EncoderType.Render) if (_currentEncoder == null || _currentEncoderType != EncoderType.Render)
{ {
BeginRenderPass(); renderCommandEncoder = BeginRenderPass();
}
else
{
renderCommandEncoder = new MTLRenderCommandEncoder(_currentEncoder.Value);
} }
var renderCommandEncoder = new MTLRenderCommandEncoder(_currentEncoder.Value);
_encoderStateManager.RebindState(renderCommandEncoder); _encoderStateManager.RebindState(renderCommandEncoder);