Cleanup present

This commit is contained in:
Isaac Marovitz 2024-05-27 10:34:16 -04:00 committed by Isaac Marovitz
parent 1f29a76ea3
commit cb8fdeafbc

View file

@ -174,10 +174,6 @@ namespace Ryujinx.Graphics.Metal
public void Present(CAMetalDrawable drawable, Texture src, Extents2D srcRegion, Extents2D dstRegion, bool isLinear) public void Present(CAMetalDrawable drawable, Texture src, Extents2D srcRegion, Extents2D dstRegion, bool isLinear)
{ {
EndCurrentPass();
SaveState();
// TODO: Clean this up // TODO: Clean this up
var textureInfo = new TextureCreateInfo((int)drawable.Texture.Width, (int)drawable.Texture.Height, (int)drawable.Texture.Depth, (int)drawable.Texture.MipmapLevelCount, (int)drawable.Texture.SampleCount, 0, 0, 0, Format.B8G8R8A8Unorm, 0, Target.Texture2D, SwizzleComponent.Red, SwizzleComponent.Green, SwizzleComponent.Blue, SwizzleComponent.Alpha); var textureInfo = new TextureCreateInfo((int)drawable.Texture.Width, (int)drawable.Texture.Height, (int)drawable.Texture.Depth, (int)drawable.Texture.MipmapLevelCount, (int)drawable.Texture.SampleCount, 0, 0, 0, Format.B8G8R8A8Unorm, 0, Target.Texture2D, SwizzleComponent.Red, SwizzleComponent.Green, SwizzleComponent.Blue, SwizzleComponent.Alpha);
var dst = new Texture(_device, this, textureInfo, drawable.Texture, 0, 0); var dst = new Texture(_device, this, textureInfo, drawable.Texture, 0, 0);
@ -191,8 +187,6 @@ namespace Ryujinx.Graphics.Metal
_commandBuffer = _commandQueue.CommandBuffer(); _commandBuffer = _commandQueue.CommandBuffer();
RestoreState();
// Cleanup // Cleanup
dst.Dispose(); dst.Dispose();
} }