diff --git a/Directory.Packages.props b/Directory.Packages.props
index 5682c48c1..7f25b7b79 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -38,7 +38,7 @@
-
+
diff --git a/Directory.Packages.props.orig b/Directory.Packages.props.orig
index 8f22ea60c..14097e354 100644
--- a/Directory.Packages.props.orig
+++ b/Directory.Packages.props.orig
@@ -3,13 +3,13 @@
true
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -17,18 +17,15 @@
-
-<<<<<<< HEAD
+<<<<<<< HEAD
-
=======
-
-
-
->>>>>>> 45a6dffcf (Bump SharpMetal)
+
+>>>>>>> 546c1ffc0 (Fix some rebase errors)
+
@@ -39,29 +36,26 @@
-
+
-
+
-
+
<<<<<<< HEAD
+=======
+
+>>>>>>> 546c1ffc0 (Fix some rebase errors)
-=======
-
-
-
-
->>>>>>> 45a6dffcf (Bump SharpMetal)
-
\ No newline at end of file
+
diff --git a/src/Ryujinx.Graphics.Metal/EnumConversion.cs b/src/Ryujinx.Graphics.Metal/EnumConversion.cs
index 0e23d8804..d0987f0fe 100644
--- a/src/Ryujinx.Graphics.Metal/EnumConversion.cs
+++ b/src/Ryujinx.Graphics.Metal/EnumConversion.cs
@@ -1,6 +1,6 @@
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.GAL;
-using SharpMetal;
+using SharpMetal.Metal;
namespace Ryujinx.Graphics.Metal
{
@@ -168,7 +168,7 @@ namespace Ryujinx.Graphics.Metal
{
return target switch
{
- Target.TextureBuffer => MTLTextureType.TypeTextureBuffer,
+ Target.TextureBuffer => MTLTextureType.TextureBuffer,
Target.Texture1D => MTLTextureType.Type1D,
Target.Texture1DArray => MTLTextureType.Type1DArray,
Target.Texture2D => MTLTextureType.Type2D,
@@ -176,8 +176,8 @@ namespace Ryujinx.Graphics.Metal
Target.Texture2DMultisample => MTLTextureType.Type2DMultisample,
Target.Texture2DMultisampleArray => MTLTextureType.Type2DMultisampleArray,
Target.Texture3D => MTLTextureType.Type3D,
- Target.Cubemap => MTLTextureType.TypeCube,
- Target.CubemapArray => MTLTextureType.TypeCubeArray,
+ Target.Cubemap => MTLTextureType.Cube,
+ Target.CubemapArray => MTLTextureType.CubeArray,
_ => LogInvalidAndReturn(target, nameof(Target), MTLTextureType.Type2D)
};
}
@@ -203,4 +203,4 @@ namespace Ryujinx.Graphics.Metal
return defaultValue;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Ryujinx.Graphics.Metal/Pipeline.cs b/src/Ryujinx.Graphics.Metal/Pipeline.cs
index 16e678710..254f3e842 100644
--- a/src/Ryujinx.Graphics.Metal/Pipeline.cs
+++ b/src/Ryujinx.Graphics.Metal/Pipeline.cs
@@ -23,12 +23,12 @@ namespace Ryujinx.Graphics.Metal
private readonly HelperShaders _helperShaders;
private MTLCommandBuffer _commandBuffer;
- private MTLCommandEncoder _currentEncoder;
- private MTLTexture[] _renderTargets = Array.Empty();
+ private MTLCommandEncoder? _currentEncoder;
+ private MTLTexture[] _renderTargets = [];
private RenderEncoderState _renderEncoderState;
private readonly MTLVertexDescriptor _vertexDescriptor = new();
- private MTLBuffer[] _vertexBuffers = Array.Empty();
+ private MTLBuffer[] _vertexBuffers = [];
private MTLBuffer _indexBuffer;
private MTLIndexType _indexType;
@@ -393,6 +393,11 @@ namespace Ryujinx.Graphics.Metal
}
}
+ public void SetImage(ShaderStage stage, int binding, ITexture texture, Format imageFormat)
+ {
+ Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
+ }
+
public void SetImage(int binding, ITexture texture, Format imageFormat)
{
Logger.Warning?.Print(LogClass.Gpu, "Not Implemented!");
diff --git a/src/Ryujinx.Graphics.Metal/RenderEncoderState.cs b/src/Ryujinx.Graphics.Metal/RenderEncoderState.cs
index 78013833c..d58fae206 100644
--- a/src/Ryujinx.Graphics.Metal/RenderEncoderState.cs
+++ b/src/Ryujinx.Graphics.Metal/RenderEncoderState.cs
@@ -11,15 +11,15 @@ namespace Ryujinx.Graphics.Metal
struct RenderEncoderState
{
private readonly MTLDevice _device;
- private readonly MTLFunction _vertexFunction = null;
- private readonly MTLFunction _fragmentFunction = null;
- private MTLDepthStencilState _depthStencilState = null;
+ private readonly MTLFunction? _vertexFunction = null;
+ private readonly MTLFunction? _fragmentFunction = null;
+ private MTLDepthStencilState? _depthStencilState = null;
private MTLCompareFunction _depthCompareFunction = MTLCompareFunction.Always;
private bool _depthWriteEnabled = false;
- private MTLStencilDescriptor _backFaceStencil = null;
- private MTLStencilDescriptor _frontFaceStencil = null;
+ private MTLStencilDescriptor? _backFaceStencil = null;
+ private MTLStencilDescriptor? _frontFaceStencil = null;
public PrimitiveTopology Topology = PrimitiveTopology.Triangles;
public MTLCullMode CullMode = MTLCullMode.None;
@@ -41,12 +41,12 @@ namespace Ryujinx.Graphics.Metal
if (_vertexFunction != null)
{
- renderPipelineDescriptor.VertexFunction = _vertexFunction;
+ renderPipelineDescriptor.VertexFunction = _vertexFunction.Value;
}
if (_fragmentFunction != null)
{
- renderPipelineDescriptor.FragmentFunction = _fragmentFunction;
+ renderPipelineDescriptor.FragmentFunction = _fragmentFunction.Value;
}
var attachment = renderPipelineDescriptor.ColorAttachments.Object(0);
@@ -70,7 +70,7 @@ namespace Ryujinx.Graphics.Metal
if (_depthStencilState != null)
{
- renderCommandEncoder.SetDepthStencilState(_depthStencilState);
+ renderCommandEncoder.SetDepthStencilState(_depthStencilState.Value);
}
}
@@ -79,13 +79,15 @@ namespace Ryujinx.Graphics.Metal
_backFaceStencil = backFace;
_frontFaceStencil = frontFace;
- return _depthStencilState = _device.NewDepthStencilState(new MTLDepthStencilDescriptor
+ _depthStencilState = _device.NewDepthStencilState(new MTLDepthStencilDescriptor
{
DepthCompareFunction = _depthCompareFunction,
DepthWriteEnabled = _depthWriteEnabled,
- BackFaceStencil = _backFaceStencil,
- FrontFaceStencil = _frontFaceStencil
+ BackFaceStencil = _backFaceStencil.Value,
+ FrontFaceStencil = _frontFaceStencil.Value
});
+
+ return _depthStencilState.Value;
}
public MTLDepthStencilState UpdateDepthState(MTLCompareFunction depthCompareFunction, bool depthWriteEnabled)
@@ -93,13 +95,15 @@ namespace Ryujinx.Graphics.Metal
_depthCompareFunction = depthCompareFunction;
_depthWriteEnabled = depthWriteEnabled;
- return _depthStencilState = _device.NewDepthStencilState(new MTLDepthStencilDescriptor
+ _depthStencilState = _device.NewDepthStencilState(new MTLDepthStencilDescriptor
{
DepthCompareFunction = _depthCompareFunction,
DepthWriteEnabled = _depthWriteEnabled,
- BackFaceStencil = _backFaceStencil,
- FrontFaceStencil = _frontFaceStencil
+ BackFaceStencil = _backFaceStencil.Value,
+ FrontFaceStencil = _frontFaceStencil.Value
});
+
+ return _depthStencilState.Value;
}
}
}
diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj
index 6718b7fcc..41d24a2fa 100644
--- a/src/Ryujinx/Ryujinx.csproj
+++ b/src/Ryujinx/Ryujinx.csproj
@@ -52,6 +52,7 @@
+
@@ -59,6 +60,7 @@
+
diff --git a/src/Ryujinx/UI/Renderer/EmbeddedWindowMetal.cs b/src/Ryujinx/UI/Renderer/EmbeddedWindowMetal.cs
index a8bac75c0..5373f8ed1 100644
--- a/src/Ryujinx/UI/Renderer/EmbeddedWindowMetal.cs
+++ b/src/Ryujinx/UI/Renderer/EmbeddedWindowMetal.cs
@@ -2,7 +2,7 @@ using SPB.Windowing;
using SPB.Platform.Metal;
using System;
-namespace Ryujinx.UI.Renderer
+namespace Ryujinx.Ava.UI.Renderer
{
public class EmbeddedWindowMetal : EmbeddedWindow
{
@@ -22,4 +22,4 @@ namespace Ryujinx.UI.Renderer
return simpleMetalWindow;
}
}
-}
\ No newline at end of file
+}