From acec701c8c076ffda397c17802e62877247f3916 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Saenz Date: Thu, 19 Oct 2023 17:53:35 -0400 Subject: [PATCH 1/2] [MetalKit] Add support for xcode1 5. --- src/metalkit.cs | 12 ++++++++++++ .../api-annotations-dotnet/iOS-MetalKit.todo | 3 --- .../api-annotations-dotnet/macOS-MetalKit.todo | 3 --- .../api-annotations-dotnet/tvOS-MetalKit.todo | 3 --- tests/xtro-sharpie/iOS-MetalKit.todo | 3 --- tests/xtro-sharpie/macOS-MetalKit.todo | 3 --- tests/xtro-sharpie/tvOS-MetalKit.todo | 3 --- 7 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalKit.todo delete mode 100644 tests/xtro-sharpie/iOS-MetalKit.todo delete mode 100644 tests/xtro-sharpie/macOS-MetalKit.todo delete mode 100644 tests/xtro-sharpie/tvOS-MetalKit.todo diff --git a/src/metalkit.cs b/src/metalkit.cs index 942cbb0c266a..60a95dbda7ff 100644 --- a/src/metalkit.cs +++ b/src/metalkit.cs @@ -140,6 +140,10 @@ interface MTKView : NSCoding, CALayerDelegate { [MacCatalyst (13, 1)] [Export ("multisampleColorAttachmentTextureUsage", ArgumentSemantic.Assign)] MTLTextureUsage MultisampleColorAttachmentTextureUsage { get; set; } + + [Mac (13, 0), iOS (16, 0), TV (16,0), MacCatalyst (16, 0)] + [Export ("depthStencilStorageMode", ArgumentSemantic.Assign)] + MTLStorageMode DepthStencilStorageMode { get; set; } } [MacCatalyst (13, 1)] @@ -197,6 +201,11 @@ interface MTKTextureLoaderKeys { [MacCatalyst (13, 1)] [Field ("MTKTextureLoaderOptionOrigin")] NSString OriginKey { get; } + + [iOS (17, 0), Mac (14, 0), TV (17,0), MacCatalyst (17, 0)] + [Field ("MTKTextureLoaderOptionLoadAsArray")] + NSString LoadAsArrayKey { get; } + } [MacCatalyst (13, 1)] @@ -223,6 +232,9 @@ interface MTKTextureLoaderOptions { bool GenerateMipmaps { get; set; } bool Srgb { get; set; } + + [iOS (17, 0), Mac (14, 0), TV (17,0), MacCatalyst (17, 0)] + bool LoadAsArray { get; set; } } [MacCatalyst (13, 1)] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalKit.todo deleted file mode 100644 index c04a05210c2b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalKit.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! MTKView::depthStencilStorageMode not bound -!missing-selector! MTKView::setDepthStencilStorageMode: not bound -!missing-field! MTKTextureLoaderOptionLoadAsArray not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.todo deleted file mode 100644 index c04a05210c2b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalKit.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! MTKView::depthStencilStorageMode not bound -!missing-selector! MTKView::setDepthStencilStorageMode: not bound -!missing-field! MTKTextureLoaderOptionLoadAsArray not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalKit.todo deleted file mode 100644 index c04a05210c2b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalKit.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! MTKView::depthStencilStorageMode not bound -!missing-selector! MTKView::setDepthStencilStorageMode: not bound -!missing-field! MTKTextureLoaderOptionLoadAsArray not bound diff --git a/tests/xtro-sharpie/iOS-MetalKit.todo b/tests/xtro-sharpie/iOS-MetalKit.todo deleted file mode 100644 index c04a05210c2b..000000000000 --- a/tests/xtro-sharpie/iOS-MetalKit.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! MTKView::depthStencilStorageMode not bound -!missing-selector! MTKView::setDepthStencilStorageMode: not bound -!missing-field! MTKTextureLoaderOptionLoadAsArray not bound diff --git a/tests/xtro-sharpie/macOS-MetalKit.todo b/tests/xtro-sharpie/macOS-MetalKit.todo deleted file mode 100644 index c04a05210c2b..000000000000 --- a/tests/xtro-sharpie/macOS-MetalKit.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! MTKView::depthStencilStorageMode not bound -!missing-selector! MTKView::setDepthStencilStorageMode: not bound -!missing-field! MTKTextureLoaderOptionLoadAsArray not bound diff --git a/tests/xtro-sharpie/tvOS-MetalKit.todo b/tests/xtro-sharpie/tvOS-MetalKit.todo deleted file mode 100644 index c04a05210c2b..000000000000 --- a/tests/xtro-sharpie/tvOS-MetalKit.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! MTKView::depthStencilStorageMode not bound -!missing-selector! MTKView::setDepthStencilStorageMode: not bound -!missing-field! MTKTextureLoaderOptionLoadAsArray not bound From 73519b0bfcd418dad412877090f91107abd23f4a Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Thu, 19 Oct 2023 21:58:02 +0000 Subject: [PATCH 2/2] Auto-format source code --- src/metalkit.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/metalkit.cs b/src/metalkit.cs index 60a95dbda7ff..4aaf84d1e834 100644 --- a/src/metalkit.cs +++ b/src/metalkit.cs @@ -141,7 +141,7 @@ interface MTKView : NSCoding, CALayerDelegate { [Export ("multisampleColorAttachmentTextureUsage", ArgumentSemantic.Assign)] MTLTextureUsage MultisampleColorAttachmentTextureUsage { get; set; } - [Mac (13, 0), iOS (16, 0), TV (16,0), MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] [Export ("depthStencilStorageMode", ArgumentSemantic.Assign)] MTLStorageMode DepthStencilStorageMode { get; set; } } @@ -202,7 +202,7 @@ interface MTKTextureLoaderKeys { [Field ("MTKTextureLoaderOptionOrigin")] NSString OriginKey { get; } - [iOS (17, 0), Mac (14, 0), TV (17,0), MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), TV (17, 0), MacCatalyst (17, 0)] [Field ("MTKTextureLoaderOptionLoadAsArray")] NSString LoadAsArrayKey { get; } @@ -233,7 +233,7 @@ interface MTKTextureLoaderOptions { bool Srgb { get; set; } - [iOS (17, 0), Mac (14, 0), TV (17,0), MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), TV (17, 0), MacCatalyst (17, 0)] bool LoadAsArray { get; set; } }