mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 18:43:04 +00:00
Get render command encoder after finalising buffers
Fixes crash in Fire Emblem: Houses
This commit is contained in:
parent
080af8db24
commit
01f41b8b0e
1 changed files with 3 additions and 4 deletions
|
@ -315,8 +315,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var renderCommandEncoder = GetOrCreateRenderEncoder(true);
|
|
||||||
|
|
||||||
if (TopologyUnsupported(_encoderStateManager.Topology))
|
if (TopologyUnsupported(_encoderStateManager.Topology))
|
||||||
{
|
{
|
||||||
var pattern = GetIndexBufferPattern();
|
var pattern = GetIndexBufferPattern();
|
||||||
|
@ -326,6 +324,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
var mtlBuffer = buffer.Get(Cbs, 0, indexCount * sizeof(int)).Value;
|
var mtlBuffer = buffer.Get(Cbs, 0, indexCount * sizeof(int)).Value;
|
||||||
|
|
||||||
var primitiveType = TopologyRemap(_encoderStateManager.Topology).Convert();
|
var primitiveType = TopologyRemap(_encoderStateManager.Topology).Convert();
|
||||||
|
var renderCommandEncoder = GetOrCreateRenderEncoder(true);
|
||||||
|
|
||||||
renderCommandEncoder.DrawIndexedPrimitives(
|
renderCommandEncoder.DrawIndexedPrimitives(
|
||||||
primitiveType,
|
primitiveType,
|
||||||
|
@ -337,6 +336,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var primitiveType = TopologyRemap(_encoderStateManager.Topology).Convert();
|
var primitiveType = TopologyRemap(_encoderStateManager.Topology).Convert();
|
||||||
|
var renderCommandEncoder = GetOrCreateRenderEncoder(true);
|
||||||
|
|
||||||
renderCommandEncoder.DrawPrimitives(
|
renderCommandEncoder.DrawPrimitives(
|
||||||
primitiveType,
|
primitiveType,
|
||||||
|
@ -449,8 +449,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
|
|
||||||
public void DrawIndirect(BufferRange indirectBuffer)
|
public void DrawIndirect(BufferRange indirectBuffer)
|
||||||
{
|
{
|
||||||
var renderCommandEncoder = GetOrCreateRenderEncoder(true);
|
|
||||||
|
|
||||||
if (TopologyUnsupported(_encoderStateManager.Topology))
|
if (TopologyUnsupported(_encoderStateManager.Topology))
|
||||||
{
|
{
|
||||||
// TODO: Reindex unsupported topologies
|
// TODO: Reindex unsupported topologies
|
||||||
|
@ -462,6 +460,7 @@ namespace Ryujinx.Graphics.Metal
|
||||||
.Get(Cbs, indirectBuffer.Offset, indirectBuffer.Size).Value;
|
.Get(Cbs, indirectBuffer.Offset, indirectBuffer.Size).Value;
|
||||||
|
|
||||||
var primitiveType = TopologyRemap(_encoderStateManager.Topology).Convert();
|
var primitiveType = TopologyRemap(_encoderStateManager.Topology).Convert();
|
||||||
|
var renderCommandEncoder = GetOrCreateRenderEncoder(true);
|
||||||
|
|
||||||
renderCommandEncoder.DrawPrimitives(
|
renderCommandEncoder.DrawPrimitives(
|
||||||
primitiveType,
|
primitiveType,
|
||||||
|
|
Loading…
Reference in a new issue