mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 11:03:04 +00:00
dispose all temporary buffers
This commit is contained in:
parent
f470430c2f
commit
2833642858
1 changed files with 9 additions and 1 deletions
|
@ -222,7 +222,6 @@ namespace Ryujinx.Graphics.Metal
|
||||||
bytesPerImage
|
bytesPerImage
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: Dispose the buffer
|
|
||||||
return new PinnedSpan<byte>(mtlBuffer.Contents.ToPointer(), (int)length, () => mtlBuffer.Dispose());
|
return new PinnedSpan<byte>(mtlBuffer.Contents.ToPointer(), (int)length, () => mtlBuffer.Dispose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,6 +277,9 @@ namespace Ryujinx.Graphics.Metal
|
||||||
depth = Math.Max(1, depth >> 1);
|
depth = Math.Max(1, depth >> 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
mtlBuffer.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetData(IMemoryOwner<byte> data, int layer, int level)
|
public void SetData(IMemoryOwner<byte> data, int layer, int level)
|
||||||
|
@ -309,6 +311,9 @@ namespace Ryujinx.Graphics.Metal
|
||||||
(ulong)level,
|
(ulong)level,
|
||||||
new MTLOrigin()
|
new MTLOrigin()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
mtlBuffer.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,6 +346,9 @@ namespace Ryujinx.Graphics.Metal
|
||||||
(ulong)level,
|
(ulong)level,
|
||||||
new MTLOrigin { x = (ulong)region.X, y = (ulong)region.Y }
|
new MTLOrigin { x = (ulong)region.X, y = (ulong)region.Y }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
mtlBuffer.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue