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

@ -1,6 +1,5 @@
using Ryujinx.Graphics.GAL;
using SharpMetal.Metal;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Versioning;
@ -38,10 +37,10 @@ namespace Ryujinx.Graphics.Metal
public TextureBase[] ComputeTextures = new TextureBase[Constants.MaxTextures];
public MTLSamplerState[] ComputeSamplers = new MTLSamplerState[Constants.MaxSamplers];
public List<BufferInfo> UniformBuffers = [];
public List<BufferInfo> StorageBuffers = [];
public BufferAssignment[] UniformBuffers = [];
public BufferAssignment[] StorageBuffers = [];
public MTLBuffer IndexBuffer = default;
public BufferRange IndexBuffer = default;
public MTLIndexType IndexType = MTLIndexType.UInt16;
public ulong IndexBufferOffset = 0;