Use return value of BeginRenderPass
This commit is contained in:
parent
684e025d61
commit
f2490347af
1 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue