Seizure my beloved is working

This commit is contained in:
Isaac Marovitz 2023-08-02 19:56:59 -04:00 committed by Isaac Marovitz
parent 6d722d83ba
commit aaa140e510
5 changed files with 109 additions and 39 deletions

View file

@ -9,7 +9,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Graphics.Metal
{
[SupportedOSPlatform("macos")]
class Texture : ITexture, IDisposable
public class Texture : ITexture, IDisposable
{
private readonly TextureCreateInfo _info;
private readonly Pipeline _pipeline;
@ -23,6 +23,7 @@ namespace Ryujinx.Graphics.Metal
public Texture(MTLDevice device, Pipeline pipeline, TextureCreateInfo info)
{
Logger.Warning?.Print(LogClass.Gpu, "Texture init");
_device = device;
_pipeline = pipeline;
_info = info;
@ -50,6 +51,7 @@ namespace Ryujinx.Graphics.Metal
public void CopyTo(ITexture destination, int firstLayer, int firstLevel)
{
Logger.Warning?.Print(LogClass.Gpu, "Copy to");
MTLBlitCommandEncoder blitCommandEncoder;
if (_pipeline.CurrentEncoder is MTLBlitCommandEncoder encoder)
@ -77,6 +79,7 @@ namespace Ryujinx.Graphics.Metal
public void CopyTo(ITexture destination, int srcLayer, int dstLayer, int srcLevel, int dstLevel)
{
Logger.Warning?.Print(LogClass.Gpu, "Copy to");
MTLBlitCommandEncoder blitCommandEncoder;
if (_pipeline.CurrentEncoder is MTLBlitCommandEncoder encoder)
@ -109,6 +112,7 @@ namespace Ryujinx.Graphics.Metal
public void CopyTo(BufferRange range, int layer, int level, int stride)
{
Logger.Warning?.Print(LogClass.Gpu, "Copy to");
MTLBlitCommandEncoder blitCommandEncoder;
if (_pipeline.CurrentEncoder is MTLBlitCommandEncoder encoder)
@ -160,6 +164,7 @@ namespace Ryujinx.Graphics.Metal
// TODO: Handle array formats
public unsafe void SetData(SpanOrArray<byte> data)
{
Logger.Warning?.Print(LogClass.Gpu, "Set data");
MTLBlitCommandEncoder blitCommandEncoder;
if (_pipeline.CurrentEncoder is MTLBlitCommandEncoder encoder)
@ -216,6 +221,7 @@ namespace Ryujinx.Graphics.Metal
public void SetData(SpanOrArray<byte> data, int layer, int level)
{
Logger.Warning?.Print(LogClass.Gpu, "Set data");
MTLBlitCommandEncoder blitCommandEncoder;
if (_pipeline.CurrentEncoder is MTLBlitCommandEncoder encoder)
@ -257,6 +263,7 @@ namespace Ryujinx.Graphics.Metal
public void SetData(SpanOrArray<byte> data, int layer, int level, Rectangle<int> region)
{
Logger.Warning?.Print(LogClass.Gpu, "Set data");
MTLBlitCommandEncoder blitCommandEncoder;
if (_pipeline.CurrentEncoder is MTLBlitCommandEncoder encoder)