Metal: Buffers Take 2 (#21)

* Basic BufferManager

* Start Scoped Command Buffers

* Fences stuff

* Remember to cleanup sync manager

* Auto, Command Buffer Dependants

* Cleanup

* Cleanup + Fix Texture->Buffer Copies

* Slow buffer upload

* Cleanup + Rework TextureBuffer

* Don’t get unsafe

* Cleanup

* Goddamn it

* Staging Buffer + Interrupt Action + Flush
This commit is contained in:
Isaac Marovitz 2024-06-19 23:13:55 +01:00
parent d0946213fa
commit 58b3e2e82b
24 changed files with 2380 additions and 205 deletions

View file

@ -6,13 +6,14 @@ using System.Runtime.Versioning;
namespace Ryujinx.Graphics.Metal
{
[SupportedOSPlatform("macos")]
abstract class TextureBase : IDisposable
public abstract class TextureBase : IDisposable
{
private bool _disposed;
protected readonly TextureCreateInfo _info;
protected readonly Pipeline _pipeline;
protected readonly MTLDevice _device;
protected readonly MetalRenderer _renderer;
protected MTLTexture _mtlTexture;
@ -21,9 +22,10 @@ namespace Ryujinx.Graphics.Metal
public int Height => Info.Height;
public int Depth => Info.Depth;
public TextureBase(MTLDevice device, Pipeline pipeline, TextureCreateInfo info)
public TextureBase(MTLDevice device, MetalRenderer renderer, Pipeline pipeline, TextureCreateInfo info)
{
_device = device;
_renderer = renderer;
_pipeline = pipeline;
_info = info;
}