Preload command speedup, Texture/buffer data flush, blit shader fix (#30)

* Move encoder state to be tied to command buffer, so preload and background cbs have their own encoder state

* Texture buffer/data flush, blit shader fix
This commit is contained in:
riperiperi 2024-06-30 17:23:53 +01:00 committed by Isaac Marovitz
parent 80f9a5d0da
commit 2511bf1e4c
13 changed files with 414 additions and 204 deletions

View file

@ -67,7 +67,10 @@ namespace Ryujinx.Graphics.Metal
public void BackgroundContextAction(Action action, bool alwaysBackground = false)
{
Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
// GetData methods should be thread safe, so we can call this directly.
// Texture copy (scaled) may also happen in here, so that should also be thread safe.
action();
}
public BufferHandle CreateBuffer(int size, BufferAccess access)
@ -221,7 +224,7 @@ namespace Ryujinx.Graphics.Metal
public void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data)
{
BufferManager.SetData(buffer, offset, data, _pipeline.Cbs, _pipeline.EndRenderPassDelegate);
BufferManager.SetData(buffer, offset, data, _pipeline.Cbs);
}
public void UpdateCounters()