diff --git a/Make.config b/Make.config index 7e283a6820..cb3a38cf27 100644 --- a/Make.config +++ b/Make.config @@ -9,10 +9,29 @@ $(TOP)/Make.config.inc: $(TOP)/Make.config @printf "MAC_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@ @if which ccache > /dev/null 2>&1; then printf "ENABLE_CCACHE=1\nexport CCACHE_BASEDIR=$(abspath $(TOP)/..)\n" >> $@; echo "Found ccache on the system, enabling it"; fi @if test -d $(TOP)/../maccore; then printf "ENABLE_XAMARIN=1\n" >> $@; echo "Detected the maccore repository, automatically enabled the Xamarin build"; fi + @# Build from source if we're on CI and packages aren't available. + @if ! curl -s -f --head "$(MONO_IOS_URL)" &> /dev/null; then \ + echo "$(COLOR_GRAY)*** The mono archive for iOS ($(MONO_IOS_URL)) can't be downloaded:$(COLOR_CLEAR)"; \ + echo "$$ curl -s --head '$(MONO_IOS_URL)'" | sed 's/^/ /'; \ + curl -s --head "$(MONO_IOS_URL)" | sed 's/^/ /'; \ + MONO_DOWNLOAD_FAIL=1; \ + fi; \ + if ! curl -s -f --head "$(MONO_MAC_URL)" &> /dev/null; then \ + echo "$(COLOR_GRAY)*** The mono archive for macOS ($(MONO_MAC_URL)) can't be downloaded:$(COLOR_CLEAR)"; \ + echo "$$ curl -s --head '$(MONO_MAC_URL)'" | sed 's/^/ /'; \ + curl -s --head "$(MONO_MAC_URL)" | sed 's/^/ /'; \ + MONO_DOWNLOAD_FAIL=1; \ + fi; \ + if test -n "$$MONO_DOWNLOAD_FAIL"; then \ + echo "$(COLOR_GRAY)Building mono from source because one or both of the mono archives aren't downloadable.$(COLOR_CLEAR)"; \ + printf "MONO_BUILD_FROM_SOURCE=1\n" >> $@; \ + else \ + echo "Downloading mono archives"; \ + fi include $(TOP)/Make.versions -APIDIFF_REFERENCES=https://bosstoragemirror.blob.core.windows.net/wrench/jenkins/d16-2/55ad1411fa8a269be55e3b6d5cdbae5da0818b46/31/package/bundle.zip +APIDIFF_REFERENCES=https://bosstoragemirror.blob.core.windows.net/wrench/jenkins/d16-3/d532e90de664caf46baea6226d742b9f68b3173a/44/package/bundle.zip PACKAGE_HEAD_REV=$(shell git rev-parse HEAD) @@ -40,9 +59,9 @@ IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE) IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD)) # Xcode version should have both a major and a minor version (even if the minor version is 0) -XCODE_VERSION=11.0 -XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.xip -XCODE_DEVELOPER_ROOT=/Applications/Xcode11.app/Contents/Developer +XCODE_VERSION=11.1 +XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.1.xip +XCODE_DEVELOPER_ROOT=/Applications/Xcode111.app/Contents/Developer XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist) # Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk @@ -78,7 +97,7 @@ MIN_OSX_BUILD_VERSION=10.14 MIN_OSX_VERSION_FOR_IOS=10.11 MIN_OSX_VERSION_FOR_MAC=10.11 -IOS_SDK_VERSION=13.0 +IOS_SDK_VERSION=13.1 # When bumping OSX_SDK_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element) OSX_SDK_VERSION=10.15 WATCH_SDK_VERSION=6.0 diff --git a/Make.versions b/Make.versions index 9727a905e2..8bec19db46 100644 --- a/Make.versions +++ b/Make.versions @@ -43,5 +43,5 @@ # line changed in git). # -IOS_PACKAGE_VERSION=13.8.0.$(IOS_COMMIT_DISTANCE) -MAC_PACKAGE_VERSION=6.8.0.$(MAC_COMMIT_DISTANCE) +IOS_PACKAGE_VERSION=13.8.1.$(IOS_COMMIT_DISTANCE) +MAC_PACKAGE_VERSION=6.8.1.$(MAC_COMMIT_DISTANCE) diff --git a/Versions-ios.plist.in b/Versions-ios.plist.in index b9e89b46db..ef52126330 100644 --- a/Versions-ios.plist.in +++ b/Versions-ios.plist.in @@ -34,6 +34,7 @@ 12.3 12.4 13.0 + 13.1 tvOS diff --git a/docs/website/mmp-errors.md b/docs/website/mmp-errors.md index 5f5ae20771..96c482bf30 100644 --- a/docs/website/mmp-errors.md +++ b/docs/website/mmp-errors.md @@ -732,7 +732,9 @@ You can silence this warning by adding `--nowarn=5221` to the **Additional mmp a #### MM5311: lipo failed with an error code '{0}'. Check build log for details. -### MM5311: lipo failed with an error code '{0}'. Check build log for details. + + +### MM5312: pkg-config failed with an error code '{code}'. Check build log for details. diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md index 01f858f00b..63e065e4d1 100644 --- a/docs/website/mtouch-errors.md +++ b/docs/website/mtouch-errors.md @@ -2966,6 +2966,7 @@ An error occurred when signing the application. Please review the build log to s + ## MT6xxx: mtouch internal tools error messages diff --git a/jenkins/build.sh b/jenkins/build.sh index 0b73646a98..64ee4cb302 100755 --- a/jenkins/build.sh +++ b/jenkins/build.sh @@ -128,7 +128,14 @@ echo "Configuring the build with: $CONFIGURE_FLAGS" # shellcheck disable=SC2086 ./configure $CONFIGURE_FLAGS +# If we're building mono from source, we might not have it cloned yet +make reset + time make -j8 time make install -j8 printf "✅ [Build succeeded](%s/console)\\n" "$BUILD_URL" >> "$WORKSPACE/jenkins/pr-comments.md" + +if grep MONO_BUILD_FROM_SOURCE=. configure.inc Make.config.inc >& /dev/null; then + printf " ⚠️ Mono built from source\\n" >> "$WORKSPACE/jenkins/pr-comments.md" +fi diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs index 65be65b8d0..afa7c0fdbf 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/TargetTests/TargetTests.cs @@ -116,22 +116,23 @@ namespace Xamarin.iOS.Tasks } } - static bool BundleResourceExists (string path, ref int extra) + static void BundleResourceExists (string path) { if (Path.GetExtension (path) == ".nib") { if (Directory.Exists (path)) { // Note: this suggests that things were built with the iOS 8 SDK... var objects8Nib = Path.Combine (path, "objects-8.0+.nib"); + var objects13Nib = Path.Combine (path, "objects-13.0+.nib"); var objectsNib = Path.Combine (path, "objects.nib"); var runtimeNib = Path.Combine (path, "runtime.nib"); - extra++; - - return File.Exists (runtimeNib) && (File.Exists (objectsNib) || File.Exists (objects8Nib)); + Assert.That (File.Exists (runtimeNib), $"File exists: {runtimeNib}"); + Assert.That (File.Exists (objectsNib) || File.Exists (objects8Nib) || File.Exists (objects13Nib), $"File exists: {objectsNib} || {objects8Nib} || {objects13Nib}"); + return; } } - return File.Exists (path); + Assert.IsTrue (File.Exists (path), $"Existence of {path}"); } [Test] @@ -173,17 +174,22 @@ namespace Xamarin.iOS.Tasks CollectionAssert.AreEquivalent (expected_references, actual_references, "References"); } - // [Test] - https://github.com/xamarin/xamarin-macios/issues/6970 + [Test] public void BuildExecutable () { var expectedFiles = ExpectedExecutableFiles; - int extra = 0; RunTargetOnInstance (MonoTouchProjectInstance, TargetName.Build); Assert.IsTrue (Directory.Exists (AppBundlePath), "#1"); + + var bundleResources = Directory.GetFileSystemEntries (AppBundlePath, "*", SearchOption.AllDirectories); + var inexistentResource = expectedFiles.Except (expectedFiles).ToArray (); + + Assert.That (inexistentResource, Is.Empty, "No missing resources"); + foreach (var file in expectedFiles) - Assert.IsTrue (BundleResourceExists (file, ref extra), "#2. " + file); + BundleResourceExists (file); // Verify that we have not bundled BundleResource or Content items as embedded resources var assemblyDef = AssemblyDefinition.ReadAssembly (Path.Combine (AppBundlePath, "MySingleView.exe")); @@ -440,7 +446,7 @@ namespace Xamarin.iOS.Tasks Assert.AreEqual (11, bundleResources.Length, "#1"); } - // [Test] - https://github.com/xamarin/xamarin-macios/issues/6970 + [Test] public void BundleResources () { var actool = Path.Combine ("obj", "iPhoneSimulator", "Debug", "actool", "bundle"); @@ -467,9 +473,11 @@ namespace Xamarin.iOS.Tasks Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (actool, "LaunchImage-568h@2x.png") && i.GetMetadataValue ("LogicalName") == "LaunchImage-568h@2x.png"), "#11"); Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (actool, "LaunchImage.png") && i.GetMetadataValue ("LogicalName") == "LaunchImage.png"), "#12"); Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (actool, "LaunchImage@2x.png") && i.GetMetadataValue ("LogicalName") == "LaunchImage@2x.png"), "#13"); - Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "1-view-2.nib") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/1-view-2.nib"), "#14"); + Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "1-view-2.nib", "objects-13.0+.nib") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/1-view-2.nib/objects-13.0+.nib"), "#14.1"); + Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "1-view-2.nib", "runtime.nib") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/1-view-2.nib/runtime.nib"), "#14.2"); Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "Info.plist") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/Info.plist"), "#15"); - Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "UIViewController-1.nib") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/UIViewController-1.nib"), "#16"); + Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "UIViewController-1.nib", "objects-13.0+.nib") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/UIViewController-1.nib/objects-13.0+.nib"), "#16.1"); + Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "MainStoryboard.storyboardc", "UIViewController-1.nib", "runtime.nib") && i.GetMetadataValue ("LogicalName") == "MainStoryboard.storyboardc/UIViewController-1.nib/runtime.nib"), "#16.2"); if (bundleItems.Length > ExpectedExecutableBundleResources.Length) { Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "en.lproj", "TranslatedView.nib", "runtime.nib") && i.GetMetadataValue ("LogicalName") == "en.lproj/TranslatedView.nib/runtime.nib"), "#17"); Assert.IsTrue (bundleItems.Any (i => i.EvaluatedInclude == Path.Combine (ibtool, "FolderView.nib", "runtime.nib") && i.GetMetadataValue ("LogicalName") == "FolderView.nib/runtime.nib"), "#18"); diff --git a/msbuild/tests/Xamarin.iOS.Tasks.Tests/TaskTests/IBToolTaskTests.cs b/msbuild/tests/Xamarin.iOS.Tasks.Tests/TaskTests/IBToolTaskTests.cs index 3ecc0c192e..97e066c9ca 100644 --- a/msbuild/tests/Xamarin.iOS.Tasks.Tests/TaskTests/IBToolTaskTests.cs +++ b/msbuild/tests/Xamarin.iOS.Tasks.Tests/TaskTests/IBToolTaskTests.cs @@ -59,7 +59,7 @@ namespace Xamarin.iOS.Tasks }; } - // [Test] - https://github.com/xamarin/xamarin-macios/issues/6970 + [Test] public void TestBasicIBToolFunctionality () { var tmp = Path.Combine (Path.GetTempPath (), "basic-ibtool"); @@ -81,33 +81,40 @@ namespace Xamarin.iOS.Tasks } string[] expected = { "LaunchScreen~ipad.nib/objects-8.0+.nib", + "LaunchScreen~ipad.nib/objects-13.0+.nib", "LaunchScreen~ipad.nib/runtime.nib", + "LaunchScreen~iphone.nib/objects-13.0+.nib", "LaunchScreen~iphone.nib/objects-8.0+.nib", "LaunchScreen~iphone.nib/runtime.nib", + "Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC~ipad.nib/objects-13.0+.nib", "Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC~ipad.nib/objects-8.0+.nib", "Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC~ipad.nib/runtime.nib", + "Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC~iphone.nib/objects-13.0+.nib", "Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC~iphone.nib/objects-8.0+.nib", "Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC~iphone.nib/runtime.nib", + "Main.storyboardc/UIViewController-BYZ-38-t0r~ipad.nib/objects-13.0+.nib", "Main.storyboardc/UIViewController-BYZ-38-t0r~ipad.nib/objects-8.0+.nib", "Main.storyboardc/UIViewController-BYZ-38-t0r~ipad.nib/runtime.nib", + "Main.storyboardc/UIViewController-BYZ-38-t0r~iphone.nib/objects-13.0+.nib", "Main.storyboardc/UIViewController-BYZ-38-t0r~iphone.nib/objects-8.0+.nib", "Main.storyboardc/UIViewController-BYZ-38-t0r~iphone.nib/runtime.nib", "Main~ipad.storyboardc/Info-8.0+.plist", "Main~ipad.storyboardc/Info.plist", "Main~iphone.storyboardc/Info-8.0+.plist", - "Main~iphone.storyboardc/Info.plist" + "Main~iphone.storyboardc/Info.plist", }; - foreach (var bundleResource in expected) - Assert.IsTrue (bundleResources.Contains (bundleResource), "BundleResources should include '{0}'", bundleResource); + var inexistentResource = bundleResources.Except (expected).ToArray (); + var unexpectedResource = expected.Except (bundleResources).ToArray (); - Assert.AreEqual (expected.Length, bundleResources.Count, "Unexpected number of BundleResources"); + Assert.That (inexistentResource, Is.Empty, "No missing resources"); + Assert.That (unexpectedResource, Is.Empty, "No extra resources"); } finally { Directory.Delete (tmp, true); } } - // [Test] - https://github.com/xamarin/xamarin-macios/issues/6970 + [Test] public void TestAdvancedIBToolFunctionality () { var tmp = Path.Combine (Path.GetTempPath (), "advanced-ibtool"); @@ -146,29 +153,42 @@ namespace Xamarin.iOS.Tasks ibtool.EnableOnDemandResources = true; string[] expected = { - "Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib", + "Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib", + "Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib", "Base.lproj/LaunchScreen.storyboardc/Info.plist", - "Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib", - "Base.lproj/Linked.storyboardc/5xv-Yx-H4r-view-gMo-tm-chA.nib", + "Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib", + "Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib", + "Base.lproj/Linked.storyboardc/5xv-Yx-H4r-view-gMo-tm-chA.nib/objects-13.0+.nib", + "Base.lproj/Linked.storyboardc/5xv-Yx-H4r-view-gMo-tm-chA.nib/runtime.nib", "Base.lproj/Linked.storyboardc/Info.plist", - "Base.lproj/Linked.storyboardc/MyLinkedViewController.nib", - "Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib", + "Base.lproj/Linked.storyboardc/MyLinkedViewController.nib/objects-13.0+.nib", + "Base.lproj/Linked.storyboardc/MyLinkedViewController.nib/runtime.nib", + "Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-13.0+.nib", + "Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib", "Base.lproj/Main.storyboardc/Info.plist", - "Base.lproj/Main.storyboardc/MyLinkedViewController.nib", - "Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib", - "en.lproj/Linked.storyboardc/5xv-Yx-H4r-view-gMo-tm-chA.nib", + "Base.lproj/Main.storyboardc/MyLinkedViewController.nib/objects-13.0+.nib", + "Base.lproj/Main.storyboardc/MyLinkedViewController.nib/runtime.nib", + "Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-13.0+.nib", + "Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib", + "en.lproj/Linked.storyboardc/5xv-Yx-H4r-view-gMo-tm-chA.nib/objects-13.0+.nib", + "en.lproj/Linked.storyboardc/5xv-Yx-H4r-view-gMo-tm-chA.nib/runtime.nib", "en.lproj/Linked.storyboardc/Info.plist", - "en.lproj/Linked.storyboardc/MyLinkedViewController.nib", - "en.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib", + "en.lproj/Linked.storyboardc/MyLinkedViewController.nib/objects-13.0+.nib", + "en.lproj/Linked.storyboardc/MyLinkedViewController.nib/runtime.nib", + "en.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-13.0+.nib", + "en.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib", "en.lproj/Main.storyboardc/Info.plist", - "en.lproj/Main.storyboardc/MyLinkedViewController.nib", - "en.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib" + "en.lproj/Main.storyboardc/MyLinkedViewController.nib/objects-13.0+.nib", + "en.lproj/Main.storyboardc/MyLinkedViewController.nib/runtime.nib", + "en.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-13.0+.nib", + "en.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib", }; - foreach (var bundleResource in expected) - Assert.IsTrue (bundleResources.Contains (bundleResource), "BundleResources should include '{0}'", bundleResource); + var inexistentResource = bundleResources.Except (expected).ToArray (); + var unexpectedResource = expected.Except (bundleResources).ToArray (); - Assert.AreEqual (expected.Length, bundleResources.Count, "Unexpected number of BundleResources"); + Assert.That (inexistentResource, Is.Empty, "No missing resources"); + Assert.That (unexpectedResource, Is.Empty, "No extra resources"); } finally { Directory.Delete (tmp, true); } @@ -217,31 +237,35 @@ namespace Xamarin.iOS.Tasks Assert.IsNotNullOrEmpty (bundleResource.GetMetadata ("Optimize"), "The 'Optimize' metadata must be set."); Assert.IsNotNullOrEmpty (tag, "The 'ResourceTags' metadata should be set."); - Assert.AreEqual (Path.Combine (tmp, "ibtool", tag + ".nib"), bundleResource.ItemSpec, "BundleResource is not at the expected location."); + Assert.AreEqual (Path.Combine (tmp, "ibtool", tag + ".nib", Path.GetFileName (bundleName)), bundleResource.ItemSpec, $"BundleResource {bundleName} is not at the expected location."); bundleResources.Add (bundleName); } string[] expected = { - "View.nib", "View~ipad.nib" + "View~ipad.nib/objects-13.0+.nib", + "View~ipad.nib/runtime.nib", + "View.nib/objects-13.0+.nib", + "View.nib/runtime.nib", }; - foreach (var bundleResource in expected) - Assert.IsTrue (bundleResources.Contains (bundleResource), "BundleResources should include '{0}'", bundleResource); + var inexistentResource = bundleResources.Except (expected).ToArray (); + var unexpectedResource = expected.Except (bundleResources).ToArray (); - Assert.AreEqual (expected.Length, bundleResources.Count, "Unexpected number of BundleResources"); + Assert.That (inexistentResource, Is.Empty, "No missing resources"); + Assert.That (unexpectedResource, Is.Empty, "No extra resources"); } finally { Directory.Delete (tmp, true); } } - // [Test] - https://github.com/xamarin/xamarin-macios/issues/6970 + [Test] public void TestGenericAndDeviceSpecificXibsGenericFirst () { TestGenericAndDeviceSpecificXibsGeneric ("View.xib", "View~ipad.xib"); } - // [Test] - https://github.com/xamarin/xamarin-macios/issues/6970 + [Test] public void TestGenericAndDeviceSpecificXibsGenericLast () { TestGenericAndDeviceSpecificXibsGeneric ("View~ipad.xib", "View.xib"); diff --git a/src/AudioToolbox/AudioType.cs b/src/AudioToolbox/AudioType.cs index ad8123b0f0..c6c1c645a5 100644 --- a/src/AudioToolbox/AudioType.cs +++ b/src/AudioToolbox/AudioType.cs @@ -390,16 +390,13 @@ namespace AudioToolbox { DialogCentricMix = 43, CenterSurroundDirect = 44, Haptic = 45, - -#if false - // with xcode11 GM the tvOS and macOS headers drifted from the iOS ones - // https://github.com/xamarin/maccore/issues/1960 - LeftTopFront = 46, - CenterTopFront = 47, - RightTopFront = 48, + + LeftTopFront = VerticalHeightLeft, + CenterTopFront = VerticalHeightCenter, + RightTopFront = VerticalHeightRight, LeftTopMiddle = 49, - CenterTopMiddle = 50, -#endif + CenterTopMiddle = TopCenterSurround, + RightTopMiddle = 51, LeftTopRear = 52, CenterTopRear = 53, @@ -507,15 +504,13 @@ namespace AudioToolbox { TopBackLeft = 1<<15, TopBackCenter = 1<<16, TopBackRight = 1<<17, -#if false - // with xcode11 GM the tvOS and macOS headers drifted from the iOS ones - // https://github.com/xamarin/maccore/issues/1960 - LeftTopFront = 1<<18, - CenterTopFront = 1<<19, - RightTopFront = 1<<20, + + LeftTopFront = VerticalHeightLeft, + CenterTopFront = VerticalHeightCenter, + RightTopFront = VerticalHeightRight, LeftTopMiddle = 1<<21, - CenterTopMiddle = 1<<22, -#endif + CenterTopMiddle = TopCenterSurround, + RightTopMiddle = 1<<23, LeftTopRear = 1<<24, CenterTopRear = 1<<25, diff --git a/src/Metal/Defs.cs b/src/Metal/Defs.cs index b547b82aef..1426c733ea 100644 --- a/src/Metal/Defs.cs +++ b/src/Metal/Defs.cs @@ -342,5 +342,46 @@ namespace Metal { } } #endif // MONOMAC + + [Mac (10,15), iOS (13,0), TV (13,0)] + public enum MTLTextureSwizzle : byte { + Zero = 0, + One = 1, + Red = 2, + Green = 3, + Blue = 4, + Alpha = 5, + } + + [Mac (10,15), iOS (13,0), TV (13,0)] + [StructLayout (LayoutKind.Sequential)] + public struct MTLTextureSwizzleChannels { + public MTLTextureSwizzle Red; + + public MTLTextureSwizzle Green; + + public MTLTextureSwizzle Blue; + + public MTLTextureSwizzle Alpha; + } + +#if IOS + [Introduced (PlatformName.iOS, 13,0, PlatformArchitecture.All)] + [StructLayout (LayoutKind.Sequential)] + public struct MTLVertexAmplificationViewMapping { + public uint ViewportArrayIndexOffset; + + public uint RenderTargetArrayIndexOffset; + } + + [Introduced (PlatformName.iOS, 13,0, PlatformArchitecture.All)] + [StructLayout (LayoutKind.Sequential)] + public struct MTLCoordinate2D { + public float X; + + public float Y; + } +#endif + } #endif diff --git a/src/Metal/MTLCompat.cs b/src/Metal/MTLCompat.cs index c599682f62..5295b58341 100644 --- a/src/Metal/MTLCompat.cs +++ b/src/Metal/MTLCompat.cs @@ -1,9 +1,12 @@ -#if XAMCORE_2_0 || !MONOMAC - +using System; using ObjCRuntime; namespace Metal { -} + public partial class MTLSharedTextureHandle { -#endif + [Obsolete ("Type is not meant to be created by user code.")] + public MTLSharedTextureHandle () {} + } + +} \ No newline at end of file diff --git a/src/Metal/MTLDevice.cs b/src/Metal/MTLDevice.cs index 0f674a0b93..f9e0110596 100644 --- a/src/Metal/MTLDevice.cs +++ b/src/Metal/MTLDevice.cs @@ -148,6 +148,48 @@ namespace Metal { fixed (void * handle = positions) GetDefaultSamplePositions (This, (IntPtr)handle, count); } +#if IOS + + [NoMac, NoTV, iOS (13,0)] + public static void ConvertSparseTileRegions (this IMTLDevice This, MTLRegion [] tileRegions, MTLRegion [] pixelRegions, MTLSize tileSize, nuint numRegions) + { + if (tileRegions == null) + throw new ArgumentNullException (nameof (tileRegions)); + if (pixelRegions == null) + throw new ArgumentNullException (nameof (pixelRegions)); + + var tileRegionsHandle = GCHandle.Alloc (tileRegions, GCHandleType.Pinned); + var pixelRegionsHandle = GCHandle.Alloc (pixelRegions, GCHandleType.Pinned); + try { + IntPtr tilePtr = tileRegionsHandle.AddrOfPinnedObject (); + IntPtr pixelPtr = pixelRegionsHandle.AddrOfPinnedObject (); + This.ConvertSparseTileRegions (tilePtr, pixelPtr, tileSize, numRegions); + } finally { + tileRegionsHandle.Free (); + pixelRegionsHandle.Free (); + } + } + + [NoMac, NoTV, iOS (13,0)] + public static void ConvertSparsePixelRegions (this IMTLDevice This, MTLRegion [] pixelRegions, MTLRegion [] tileRegions, MTLSize tileSize, MTLSparseTextureRegionAlignmentMode mode, nuint numRegions) + { + if (tileRegions == null) + throw new ArgumentNullException (nameof (tileRegions)); + if (pixelRegions == null) + throw new ArgumentNullException (nameof (pixelRegions)); + + var tileRegionsHandle = GCHandle.Alloc (tileRegions, GCHandleType.Pinned); + var pixelRegionsHandle = GCHandle.Alloc (pixelRegions, GCHandleType.Pinned); + try { + IntPtr tilePtr = tileRegionsHandle.AddrOfPinnedObject (); + IntPtr pixelPtr = pixelRegionsHandle.AddrOfPinnedObject (); + This.ConvertSparsePixelRegions (pixelPtr, tilePtr, tileSize, mode, numRegions); + } finally { + tileRegionsHandle.Free (); + pixelRegionsHandle.Free (); + } + } +#endif #if !XAMCORE_4_0 [return: Release] diff --git a/src/Metal/MTLEnums.cs b/src/Metal/MTLEnums.cs index 340c6558e7..f0c7273e1a 100644 --- a/src/Metal/MTLEnums.cs +++ b/src/Metal/MTLEnums.cs @@ -784,7 +784,7 @@ namespace Metal { OpaqueWhite = 2 } - [NoTV] + [TV (13,0)] [iOS (12,0)] [Mac (10,11)] [Native] @@ -1003,5 +1003,145 @@ namespace Metal { Sample0 = 0, DepthResolvedSample = 1, } + + [Unavailable (PlatformName.MacCatalyst)] + [Flags, NoMac, NoTV, iOS (13,0)] + [Native, Advice ("This API is not available when using UIKit on macOS.")] + public enum MTLSparseTextureRegionAlignmentMode : ulong { + Outward = 0x0, + Inward = 0x1, + } + + [Unavailable (PlatformName.MacCatalyst)] + [Flags, NoMac, NoTV, iOS (13,0)] + [Native, Advice ("This API is not available when using UIKit on macOS.")] + public enum MTLSparseTextureMappingMode : ulong { + Map = 0x0, + Unmap = 0x1, + } + + [Mac (10,15), iOS (13,0)] + [Native] + public enum MTLHazardTrackingMode : ulong { + Default = 0, + Untracked = 1, + Tracked = 2, + } + + [TV (13,0), Mac (10,15), iOS (13,0)] + [Native] + [ErrorDomain ("MTLCaptureErrorDomain")] + public enum MTLCaptureError : long { + NotSupported = 1, + AlreadyCapturing, + InvalidDescriptor, + } + + [TV (13,0), Mac (10,15), iOS (13,0)] + [Native] + public enum MTLGpuFamily : long { + Apple1 = 1001, + Apple2 = 1002, + Apple3 = 1003, + Apple4 = 1004, + Apple5 = 1005, + Mac1 = 2001, + Mac2 = 2002, + Common1 = 3001, + Common2 = 3002, + Common3 = 3003, + iOSMac1 = 4001, + iOSMac2 = 4002, + } + + [TV (13,0), Mac (10,15), iOS (13,0)] + [Native] + public enum MTLHeapType : long { + Automatic = 0, + Placement = 1, + } + + [Mac (10,15), iOS (13,0), TV (13,0)] + [Native] + public enum MTLCaptureDestination : long { + DeveloperTools = 1, + GpuTraceDocument, + } + + [NoiOS, NoTV, Mac (10,15)] + [Native] + public enum MTLDeviceLocation : ulong { + BuiltIn = 0, + Slot = 1, + External = 2, + Unspecified = ulong.MaxValue, + } + + [NoiOS, NoTV, Mac (10,15)] + [Native] + [ErrorDomain ("MTLCounterErrorDomain")] + public enum MTLCounterSampleBufferError : long { + OutOfMemory, + Internal, + } +#if MONOMAC + [NoiOS, NoTV, Mac (10,15)] + public enum MTLCommonCounter { + [Field ("MTLCommonCounterTimestamp")] + Timestamp, + + [Field ("MTLCommonCounterTessellationInputPatches")] + TessellationInputPatches, + + [Field ("MTLCommonCounterVertexInvocations")] + VertexInvocations, + + [Field ("MTLCommonCounterPostTessellationVertexInvocations")] + PostTessellationVertexInvocations, + + [Field ("MTLCommonCounterClipperInvocations")] + ClipperInvocations, + + [Field ("MTLCommonCounterClipperPrimitivesOut")] + ClipperPrimitivesOut, + + [Field ("MTLCommonCounterFragmentInvocations")] + FragmentInvocations, + + [Field ("MTLCommonCounterFragmentsPassed")] + FragmentsPassed, + + [Field ("MTLCommonCounterComputeKernelInvocations")] + ComputeKernelInvocations, + + [Field ("MTLCommonCounterTotalCycles")] + TotalCycles, + + [Field ("MTLCommonCounterVertexCycles")] + VertexCycles, + + [Field ("MTLCommonCounterTessellationCycles")] + TessellationCycles, + + [Field ("MTLCommonCounterPostTessellationVertexCycles")] + PostTessellationVertexCycles, + + [Field ("MTLCommonCounterFragmentCycles")] + FragmentCycles, + + [Field ("MTLCommonCounterRenderTargetWriteCycles")] + RenderTargetWriteCycles, + + [Field ("MTLCommonCounterSetTimestamp")] + SetTimestamp, + + [Field ("MTLCommonCounterSetStageUtilization")] + SetStageUtilization, + + [Field ("MTLCommonCounterSetStatistic")] + SetStatistic, + } + +#endif } #endif diff --git a/src/Metal/MTLRasterizationRateLayerDescriptor.cs b/src/Metal/MTLRasterizationRateLayerDescriptor.cs new file mode 100644 index 0000000000..87359c5ebd --- /dev/null +++ b/src/Metal/MTLRasterizationRateLayerDescriptor.cs @@ -0,0 +1,54 @@ +#if IOS +using System; +using System.ComponentModel; +using System.Runtime.InteropServices; + +using Foundation; +using ObjCRuntime; + +namespace Metal { + public partial class MTLRasterizationRateLayerDescriptor + { +/* Selectors reported as not working by instrospection: https://github.com/xamarin/maccore/issues/1976 + [NoMac, NoTV, iOS (13,0)] + public double[] HorizontalSampleStorage { + get { + var width = (int)SampleCount.Width; + var floatArray = new double[width]; + Marshal.Copy (_HorizontalSampleStorage, floatArray, 0, width); + return floatArray; + } + } + + [NoMac, NoTV, iOS (13,0)] + public double[] VerticalSampleStorage { + get { + var height = (int)SampleCount.Height; + var floatArray = new double[height]; + Marshal.Copy (_VerticalSampleStorage, floatArray, 0, height); + return floatArray; + } + } +*/ + [NoMac, NoTV, iOS (13,0)] + static public MTLRasterizationRateLayerDescriptor Create (MTLSize sampleCount, float[] horizontal, float[] vertical) + { + if (horizontal == null) + throw new ArgumentNullException (nameof (horizontal)); + if (vertical == null) + throw new ArgumentNullException (nameof (vertical)); + if (sampleCount.Width != horizontal.Length) + throw new ArgumentOutOfRangeException ("Horizontal length should be equal to the sampleCount.Width."); + if (sampleCount.Height != vertical.Length) + throw new ArgumentOutOfRangeException ("Vertical length should be equal to the sampleCount.Height."); + + unsafe { + fixed (void* horizontalHandle = horizontal) + fixed (void* verticalHandle = vertical) { + return new MTLRasterizationRateLayerDescriptor (sampleCount, (IntPtr) horizontalHandle, (IntPtr) verticalHandle); + } + } + } + } +} +#endif diff --git a/src/Metal/MTLResourceStateCommandEncoder.cs b/src/Metal/MTLResourceStateCommandEncoder.cs new file mode 100644 index 0000000000..7fa4d45c7c --- /dev/null +++ b/src/Metal/MTLResourceStateCommandEncoder.cs @@ -0,0 +1,47 @@ +// +// API for the Metal framework +// +// Authors: +// Manuel de la Pena +// +#if IOS +using System; +using System.ComponentModel; +using System.Runtime.InteropServices; + +using Foundation; +using ObjCRuntime; + +namespace Metal { + + public static partial class MTLResourceStateCommandEncoder_Extensions { + + [NoMac, NoTV, iOS (13,0)] + public static void Update (this IMTLResourceStateCommandEncoder This, IMTLTexture texture, MTLSparseTextureMappingMode mode, MTLRegion[] regions, nuint[] mipLevels, nuint[] slices) + { + if (texture == null) + throw new ArgumentNullException (nameof (texture)); + if (regions == null) + throw new ArgumentNullException (nameof (regions)); + if (mipLevels == null) + throw new ArgumentNullException (nameof (mipLevels)); + if (slices == null) + throw new ArgumentNullException (nameof (slices)); + + var regionsHandle = GCHandle.Alloc (regions, GCHandleType.Pinned); + var mipLevelsHandle = GCHandle.Alloc (mipLevels, GCHandleType.Pinned); + var slicesHandle = GCHandle.Alloc (slices, GCHandleType.Pinned); + try { + var regionsPtr = regionsHandle.AddrOfPinnedObject (); + var mipLevelsPtr = mipLevelsHandle.AddrOfPinnedObject (); + var slicesPtr = slicesHandle.AddrOfPinnedObject (); + This.Update (texture, mode, regionsPtr, mipLevelsPtr, slicesPtr, (nuint)regions.Length); + } finally { + regionsHandle.Free (); + mipLevelsHandle.Free (); + slicesHandle.Free (); + } + } + } +} +#endif \ No newline at end of file diff --git a/src/SceneKit/Defs.cs b/src/SceneKit/Defs.cs index 84534a3408..e6c6ac7629 100644 --- a/src/SceneKit/Defs.cs +++ b/src/SceneKit/Defs.cs @@ -10,6 +10,7 @@ using System; +using Foundation; using ObjCRuntime; using Vector3 = global::OpenTK.Vector3; @@ -364,6 +365,7 @@ namespace SceneKit { { Metal, #if !MONOMAC + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] OpenGLES2, #else OpenGLLegacy, @@ -458,4 +460,28 @@ namespace SceneKit { Occluding, Focusable, } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Native] + public enum SCNLightProbeType : long + { + Irradiance = 0, + Radiance = 1, + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Native] + public enum SCNLightProbeUpdateType : long + { + Never = 0, + Realtime = 1, + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Native] + public enum SCNLightAreaType : long + { + Rectangle = 1, + Polygon = 4, + } } diff --git a/src/contacts.cs b/src/contacts.cs index ad62d2793a..c92c9d1628 100644 --- a/src/contacts.cs +++ b/src/contacts.cs @@ -289,7 +289,7 @@ namespace Contacts { NSString InstantMessageAddresses { get; } } - [iOS (9,0), Mac (10,11)] + [iOS (9,0), Mac (10,11)] [BaseType (typeof (CNFetchRequest))] [DisableDefaultCtor] // using init raises an exception according to docs interface CNContactFetchRequest : NSSecureCoding { diff --git a/src/frameworks.sources b/src/frameworks.sources index 7cabbd0145..43ccb04485 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1082,8 +1082,10 @@ METAL_SOURCES = \ Metal/MTLCompat.cs \ Metal/MTLDevice.cs \ Metal/MTLArrays.cs \ + Metal/MTLRasterizationRateLayerDescriptor.cs \ Metal/MTLRenderCommandEncoder.cs \ Metal/MTLRenderPassDescriptor.cs \ + Metal/MTLResourceStateCommandEncoder.cs \ Metal/MTLVertexDescriptor.cs \ # MetalKit diff --git a/src/metal.cs b/src/metal.cs index 4065db010c..30dc375548 100644 --- a/src/metal.cs +++ b/src/metal.cs @@ -25,6 +25,11 @@ using Foundation; using ObjCRuntime; namespace Metal { + +#if !IOS + interface MTLVertexAmplificationViewMapping {} + interface MTLCoordinate2D {} +#endif delegate void MTLDeallocator (IntPtr pointer, nuint length); delegate void MTLNewComputePipelineStateWithReflectionCompletionHandler (IMTLComputePipelineState computePipelineState, MTLComputePipelineReflection reflection, NSError error); @@ -180,6 +185,21 @@ namespace Metal { #endif [Export ("removeAllDebugMarkers")] void RemoveAllDebugMarkers (); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [NullAllowed, Export ("remoteStorageBuffer")] + IMTLBuffer RemoteStorageBuffer { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("newRemoteBufferViewForDevice:")] + [return: NullAllowed] + IMTLBuffer CreateRemoteBuffer (IMTLDevice device); } [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] @@ -358,6 +378,13 @@ namespace Metal { #endif [Export ("popDebugGroup")] void PopDebugGroup (); + +#if XAMCORE_4_0 + [Abstract] // @required but we can't add abstract members in C# and keep binary compatibility +#endif + [NoMac, iOS (13, 0), NoTV] + [NullAllowed, Export ("resourceStateCommandEncoder")] + IMTLResourceStateCommandEncoder ResourceStateCommandEncoder { get; } } interface IMTLCommandQueue {} @@ -550,6 +577,27 @@ namespace Metal { #endif [Export ("memoryBarrierWithResources:count:")] void MemoryBarrier (IMTLResource[] resources, nuint count); + + [TV (13,0), NoMac, iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("executeCommandsInBuffer:withRange:")] + void ExecuteCommands (IMTLIndirectCommandBuffer indirectCommandBuffer, NSRange executionRange); + + [TV (13,0), NoMac, iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("executeCommandsInBuffer:indirectBuffer:indirectBufferOffset:")] + void ExecuteCommands (IMTLIndirectCommandBuffer indirectCommandbuffer, IMTLBuffer indirectRangeBuffer, nuint indirectBufferOffset); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] + void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); } [iOS (8,0)][Mac (10,11)] @@ -596,6 +644,13 @@ namespace Metal { #endif [Export ("imageblockMemoryLengthForDimensions:")] nuint GetImageblockMemoryLength (MTLSize imageblockDimensions); + + [TV (13, 0), NoMac, iOS (13, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportIndirectCommandBuffers")] + bool SupportIndirectCommandBuffers { get; } } interface IMTLBlitCommandEncoder {} @@ -708,6 +763,52 @@ namespace Metal { #endif [Export ("optimizeIndirectCommandBuffer:withRange:")] void Optimize (IMTLIndirectCommandBuffer indirectCommandBuffer, NSRange range); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("getTextureAccessCounters:region:mipLevel:slice:resetCounters:countersBuffer:countersBufferOffset:")] + void GetTextureAccessCounters (IMTLTexture texture, MTLRegion region, nuint mipLevel, nuint slice, bool resetCounters, IMTLBuffer countersBuffer, nuint countersBufferOffset); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("resetTextureAccessCounters:region:mipLevel:slice:")] + void ResetTextureAccessCounters (IMTLTexture texture, MTLRegion region, nuint mipLevel, nuint slice); + + [TV (13,0), Mac (10,15), iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount:")] + void Copy (IMTLTexture sourceTexture, nuint sourceSlice, nuint sourceLevel, IMTLTexture destinationTexture, nuint destinationSlice, nuint destinationLevel, nuint sliceCount, nuint levelCount); + + [TV (13,0), Mac (10,15), iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("copyFromTexture:toTexture:")] + void Copy (IMTLTexture sourceTexture, IMTLTexture destinationTexture); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] + void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("resolveCounters:inRange:destinationBuffer:destinationOffset:")] + void ResolveCounters (MTLCounterSampleBuffer sampleBuffer, NSRange range, IMTLBuffer destinationBuffer, nuint destinationOffset); } interface IMTLFence {} @@ -839,7 +940,7 @@ namespace Metal { [Export ("newTextureWithDescriptor:iosurface:plane:")] IMTLTexture CreateTexture (MTLTextureDescriptor descriptor, IOSurface.IOSurface iosurface, nuint plane); - [NoiOS, NoTV, Mac (10,14)] + [iOS (13,0), TV (13,0), Mac (10,14)] #if XAMCORE_4_0 [Abstract] #endif @@ -848,7 +949,7 @@ namespace Metal { [return: Release] IMTLTexture CreateSharedTexture (MTLTextureDescriptor descriptor); - [NoiOS, NoTV, Mac (10,14)] + [iOS (13,0), TV (13,0), Mac (10,14)] #if XAMCORE_4_0 [Abstract] #endif @@ -1156,6 +1257,156 @@ namespace Metal { #endif [Export ("newRenderPipelineStateWithTileDescriptor:options:completionHandler:")] void CreateRenderPipelineState (MTLTileRenderPipelineDescriptor descriptor, MTLPipelineOption options, MTLNewRenderPipelineStateWithReflectionCompletionHandler completionHandler); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("supportsVertexAmplificationCount:")] + bool SupportsVertexAmplification (nuint count); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("supportsRasterizationRateMapWithLayerCount:")] + bool SupportsRasterizationRateMap (nuint layerCount); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("sparseTileSizeWithTextureType:pixelFormat:sampleCount:")] + MTLSize GetSparseTileSize (MTLTextureType textureType, MTLPixelFormat pixelFormat, nuint sampleCount); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("sparseTileSizeInBytes")] + nuint SparseTileSizeInBytes { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("newRasterizationRateMapWithDescriptor:")] + [return: NullAllowed] + IMTLRasterizationRateMap CreateRasterizationRateMap (MTLRasterizationRateMapDescriptor descriptor); + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:")] + void ConvertSparseTileRegions (IntPtr tileRegions, IntPtr pixelRegions, MTLSize tileSize, nuint numRegions); + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:")] + void ConvertSparsePixelRegions (IntPtr pixelRegions, IntPtr tileRegions, MTLSize tileSize, MTLSparseTextureRegionAlignmentMode mode, nuint numRegions); + + [TV (13, 0), Mac (10, 15), iOS (13, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("hasUnifiedMemory")] + bool HasUnifiedMemory { get; } + + [TV (13,0), Mac (10,15), iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("supportsFamily:")] + bool SupportsFamily (MTLGpuFamily gpuFamily); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("barycentricCoordsSupported")] + bool BarycentricCoordsSupported { [Bind ("areBarycentricCoordsSupported")] get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("supportsShaderBarycentricCoordinates")] + bool SupportsShaderBarycentricCoordinates { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("peerIndex")] + uint PeerIndex { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("peerCount")] + uint PeerCount { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [NullAllowed, Export ("counterSets")] + MTLCounterSet[] CounterSets { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("newCounterSampleBufferWithDescriptor:error:")] + [return: NullAllowed] + MTLCounterSampleBuffer CreateCounterSampleBuffer (MTLCounterSampleBufferDescriptor descriptor, [NullAllowed] out NSError error); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("sampleTimestamps:gpuTimestamp:")] + void GetSampleTimestamps (nuint cpuTimestamp, nuint gpuTimestamp); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("peerGroupID")] + ulong PeerGroupId { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("maxTransferRate")] + ulong MaxTransferRate { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("location")] + MTLDeviceLocation Location { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [Export ("locationNumber")] + nuint LocationNumber { get; } } interface IMTLDrawable {} @@ -1344,14 +1595,14 @@ namespace Metal { [Export ("iosurfacePlane")] nuint IOSurfacePlane { get; } - [NoiOS, NoTV, Mac (10, 14)] + [iOS (13,0), TV (13,0), Mac (10, 14)] #if XAMCORE_4_0 [Abstract] #endif [Export ("shareable")] bool Shareable { [Bind ("isShareable")] get; } - [NoiOS, NoTV, Mac (10, 14)] + [iOS (13,0), TV (13,0), Mac (10, 14)] #if XAMCORE_4_0 [Abstract] #endif @@ -1359,6 +1610,63 @@ namespace Metal { [return: Release] [Export ("newSharedTextureHandle")] MTLSharedTextureHandle CreateSharedTextureHandle (); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("firstMipmapInTail")] + nuint FirstMipmapInTail { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("tailSizeInBytes")] + nuint TailSizeInBytes { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("isSparse")] + bool IsSparse { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [Mac (10, 15), TV (13,0), iOS (13, 0)] + [Export ("swizzle")] + MTLTextureSwizzleChannels Swizzle { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [Mac (10,15), TV (13,0), iOS (13,0)] + [Export ("newTextureViewWithPixelFormat:textureType:levels:slices:swizzle:")] + [return: NullAllowed] + IMTLTexture Create (MTLPixelFormat pixelFormat, MTLTextureType textureType, NSRange levelRange, NSRange sliceRange, MTLTextureSwizzleChannels swizzle); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10, 15)] + [NullAllowed, Export ("remoteStorageTexture")] + IMTLTexture RemoteStorageTexture { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("newRemoteTextureViewForDevice:")] + [return: NullAllowed] + IMTLTexture CreateRemoteTexture (IMTLDevice device); } @@ -1418,6 +1726,14 @@ namespace Metal { [Mac (10,14), iOS (12,0), TV (12,0)] [Export ("allowGPUOptimizedContents")] bool AllowGpuOptimizedContents { get; set; } + + [Mac (10, 15), iOS (13, 0), TV (13,0)] + [Export ("hazardTrackingMode", ArgumentSemantic.Assign)] + MTLHazardTrackingMode HazardTrackingMode { get; set; } + + [TV (13, 0), Mac (10, 15), iOS (13, 0)] + [Export ("swizzle", ArgumentSemantic.Assign)] + MTLTextureSwizzleChannels Swizzle { get; set; } } [iOS (8,0)][Mac (10,11)] @@ -1582,6 +1898,12 @@ namespace Metal { [Mac (10,14), iOS (12,0), TV (12,0)] [Export ("supportIndirectCommandBuffers")] bool SupportIndirectCommandBuffers { get; set; } + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("maxVertexAmplificationCount")] + nuint MaxVertexAmplificationCount { get; set; } } [iOS (8,0)][Mac (10,11)] @@ -2442,7 +2764,7 @@ namespace Metal { [Export ("executeCommandsInBuffer:withRange:")] void ExecuteCommands (IMTLIndirectCommandBuffer indirectCommandBuffer, NSRange executionRange); - [NoiOS, NoTV, Mac (10,14)] + [iOS (13,0), TV (13,0), Mac (10,14)] #if XAMCORE_4_0 [Abstract] #endif @@ -2560,6 +2882,50 @@ namespace Metal { #endif [Export ("setThreadgroupMemoryLength:offset:atIndex:")] void SetThreadgroupMemoryLength (nuint length, nuint offset, nuint index); + +#if XAMCORE_4_0 + [Abstract] +#endif + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("setVertexAmplificationCount:viewMappings:")] + void SetVertexAmplificationCount (nuint count, MTLVertexAmplificationViewMapping viewMappings); + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("useResource:usage:stages:")] + void UseResource (IMTLResource resource, MTLResourceUsage usage, MTLRenderStages stages); + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("useResources:count:usage:stages:")] + void UseResources (IMTLResource[] resources, nuint count, MTLResourceUsage usage, MTLRenderStages stages); + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("useHeap:stages:")] + void UseHeap (IMTLHeap heap, MTLRenderStages stages); + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV(13,0), Mac (10,15), iOS (13,0)] + [Export ("useHeaps:count:stages:")] + void UseHeaps (IMTLHeap[] heaps, nuint count, MTLRenderStages stages); + +#if XAMCORE_4_0 + [Abstract] +#endif + [NoiOS, NoTV, Mac (10,15)] + [Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")] + void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); } [iOS (8,0)][Mac (10,11)] @@ -2752,17 +3118,31 @@ namespace Metal { [Export ("tileHeight")] nuint TileHeight { get; set; } - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac (10,15)] [Export ("defaultRasterSampleCount")] nuint DefaultRasterSampleCount { get; set; } - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac(10,15)] [Export ("renderTargetWidth")] nuint RenderTargetWidth { get; set; } - [iOS (11, 0), NoTV, NoWatch, NoMac] + [iOS (11, 0), NoTV, NoWatch, Mac (10,15)] [Export ("renderTargetHeight")] nuint RenderTargetHeight { get; set; } + +/* Selectors reported missing by instrospection: https://github.com/xamarin/maccore/issues/1978 + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [Export ("maxVertexAmplificationCount")] + nuint MaxVertexAmplificationCount { get; set; } +*/ + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13, 0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [NullAllowed, Export ("rasterizationRateMap", ArgumentSemantic.Strong)] + IMTLRasterizationRateMap RasterizationRateMap { get; set; } } @@ -2779,6 +3159,20 @@ namespace Metal { [Export ("cpuCacheMode", ArgumentSemantic.Assign)] MTLCpuCacheMode CpuCacheMode { get; set; } + +/* Selectors missing reported by introspection: https://github.com/xamarin/maccore/issues/1978 + [Mac (10, 15), iOS (13, 0)] + [Export ("hazardTrackingMode", ArgumentSemantic.Assign)] + MTLHazardTrackingMode HazardTrackingMode { get; set; } + + [Mac (10, 15), iOS (13, 0)] + [Export ("resourceOptions", ArgumentSemantic.Assign)] + MTLResourceOptions ResourceOptions { get; set; } + + [Mac (10, 15), iOS (13, 0)] + [Export ("type", ArgumentSemantic.Assign)] + MTLHeapType Type { get; set; } + */ } [iOS (10, 0), TV (10,0), NoWatch, Mac (10,13)] @@ -2835,6 +3229,43 @@ namespace Metal { #endif [Export ("currentAllocatedSize")] nuint CurrentAllocatedSize { get; } + + [TV (13, 0), Mac (10, 15), iOS (13, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("hazardTrackingMode")] + MTLHazardTrackingMode HazardTrackingMode { get; } + + [TV (13, 0), Mac (10, 15), iOS (13, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("resourceOptions")] + MTLResourceOptions ResourceOptions { get; } + + [TV (13, 0), Mac (10, 15), iOS (13, 0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("type")] + MTLHeapType Type { get; } + + [TV (13,0), Mac (10,15), iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newBufferWithLength:options:offset:")] + [return: NullAllowed] + IMTLBuffer CreateBuffer (nuint length, MTLResourceOptions options, nuint offset); + + [TV (13,0), Mac (10,15), iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("newTextureWithDescriptor:offset:")] + [return: NullAllowed] + IMTLTexture CreateTexture (MTLTextureDescriptor descriptor, nuint offset); } interface IMTLResource {} @@ -2889,6 +3320,27 @@ namespace Metal { #endif [Export ("allocatedSize")] nuint AllocatedSize { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13, 0), Mac (10, 15), iOS (13, 0)] + [Export ("resourceOptions")] + MTLResourceOptions ResourceOptions { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13, 0), Mac (10, 15), iOS (13, 0)] + [Export ("heapOffset")] + nuint HeapOffset { get; } + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13, 0), Mac (10, 15), iOS (13, 0)] + [Export ("hazardTrackingMode")] + MTLHazardTrackingMode HazardTrackingMode { get; } } [iOS (9,0)][Mac (10,11)] @@ -2921,6 +3373,10 @@ namespace Metal { [Mac (10, 13), iOS (11,0), TV (11,0), NoWatch] [Export ("buffers")] MTLPipelineBufferDescriptorArray Buffers { get; } + + [NoMac, iOS (13, 0), TV (13,0)] + [Export ("supportIndirectCommandBuffers")] + bool SupportIndirectCommandBuffers { get; set; } } [iOS (10,0), TV (10,0), NoWatch, Mac (10,12)] @@ -3045,12 +3501,21 @@ namespace Metal { [return: Release] IMTLCaptureScope CreateNewCaptureScope (IMTLCommandQueue commandQueue); + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] + [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] [Export ("startCaptureWithDevice:")] void StartCapture (IMTLDevice device); + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] + [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] [Export ("startCaptureWithCommandQueue:")] void StartCapture (IMTLCommandQueue commandQueue); + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] + [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'StartCapture (MTLCaptureDescriptor, NSError)' instead.")] [Export ("startCaptureWithScope:")] void StartCapture (IMTLCaptureScope captureScope); @@ -3062,6 +3527,14 @@ namespace Metal { [Export ("isCapturing")] bool IsCapturing { get; } + + [Mac (10,15), iOS (13,0), TV (13,0)] + [Export ("supportsDestination:")] + bool SupportsDestination (MTLCaptureDestination destination); + + [Mac (10,15), iOS (13,0), TV (13,0)] + [Export ("startCaptureWithDescriptor:error:")] + bool StartCapture (MTLCaptureDescriptor descriptor, [NullAllowed] out NSError error); } [Mac (10,13), iOS (11,0), TV (11,0), NoWatch] @@ -3170,7 +3643,7 @@ namespace Metal { [Export ("constantDataAtIndex:")] IntPtr GetConstantData (nuint index); - [NoiOS, NoTV] + [iOS (13,0), TV (13,0)] [Mac (10,14)] #if XAMCORE_4_0 [Abstract] @@ -3178,7 +3651,7 @@ namespace Metal { [Export ("setRenderPipelineState:atIndex:")] void SetRenderPipelineState ([NullAllowed] IMTLRenderPipelineState pipeline, nuint index); - [NoiOS, NoTV] + [iOS (13,0), TV (13,0)] [Mac (10,14)] #if XAMCORE_4_0 [Abstract] @@ -3207,6 +3680,21 @@ namespace Metal { [return: NullAllowed] [return: Release] IMTLArgumentEncoder CreateArgumentEncoder (nuint index); + + [TV (13,0), NoMac, iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setComputePipelineState:atIndex:")] + void SetComputePipelineState ([NullAllowed] IMTLComputePipelineState pipeline, nuint index); + + [TV (13,0), NoMac, iOS (13,0)] +#if XAMCORE_4_0 + [Abstract] +#endif + [Export ("setComputePipelineStates:withRange:")] + void SetComputePipelineStates (IMTLComputePipelineState[] pipelines, NSRange range); + } [iOS (11, 0), NoTV, NoMac, NoWatch] @@ -3316,8 +3804,14 @@ namespace Metal { [Mac (10,14), iOS (12,0)] [Protocol] interface MTLIndirectRenderCommand { - [NoiOS, NoTV, Mac (10,14)] + +#if MONOMAC && !XAMCORE_4_0 [Abstract] +#endif +#if XAMCORE_4_0 + [Abstract] +#endif + [iOS (13,0), TV (13,0), Mac (10,14)] [Export ("setRenderPipelineState:")] void SetRenderPipelineState (IMTLRenderPipelineState pipelineState); @@ -3358,7 +3852,7 @@ namespace Metal { [Export ("commandTypes", ArgumentSemantic.Assign)] MTLIndirectCommandType CommandTypes { get; set; } - [NoiOS, NoTV] + [iOS (13,0), TV (13,0)] [Export ("inheritPipelineState")] bool InheritPipelineState { get; set; } @@ -3370,6 +3864,11 @@ namespace Metal { [Export ("maxFragmentBufferBindCount")] nuint MaxFragmentBufferBindCount { get; set; } +/* Fails introspection issue: https://github.com/xamarin/maccore/issues/1979 + [NoMac, iOS (13, 0)] + [Export ("maxKernelBufferBindCount")] + nuint MaxKernelBufferBindCount { get; set; } +*/ } interface IMTLIndirectCommandBuffer {} @@ -3388,10 +3887,18 @@ namespace Metal { [Abstract] [Export ("indirectRenderCommandAtIndex:")] IMTLIndirectRenderCommand GetCommand (nuint commandIndex); + +#if XAMCORE_4_0 + [Abstract] +#endif + [TV (13,0), NoMac, iOS (13,0)] + [Export ("indirectComputeCommandAtIndex:")] + IMTLIndirectComputeCommand GetIndirectComputeCommand (nuint commandIndex); } - [NoiOS, NoTV, Mac (10,14)] + [iOS (13,0), TV (13,0), Mac (10,14)] [BaseType (typeof(NSObject))] + [DisableDefaultCtor] interface MTLSharedTextureHandle : NSSecureCoding { [Export ("device")] IMTLDevice Device { get; } @@ -3399,5 +3906,313 @@ namespace Metal { [NullAllowed, Export ("label")] string Label { get; } } + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof(NSObject))] + interface MTLRasterizationRateSampleArray { + [Export ("objectAtIndexedSubscript:")] + NSNumber GetObject (nuint index); + + [Export ("setObject:atIndexedSubscript:")] + void SetObject (NSNumber value, nuint index); + } + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof(NSObject))] + interface MTLRasterizationRateMapDescriptor : NSCopying { + [Static] + [Export ("rasterizationRateMapDescriptorWithScreenSize:")] + MTLRasterizationRateMapDescriptor Create (MTLSize screenSize); + + [Static] + [Export ("rasterizationRateMapDescriptorWithScreenSize:layer:")] + MTLRasterizationRateMapDescriptor Create (MTLSize screenSize, MTLRasterizationRateLayerDescriptor layer); + + [Static] + [Export ("rasterizationRateMapDescriptorWithScreenSize:layerCount:layers:")] + MTLRasterizationRateMapDescriptor Create (MTLSize screenSize, nuint layerCount, out MTLRasterizationRateLayerDescriptor layers); + + [Export ("layerAtIndex:")] + [return: NullAllowed] + MTLRasterizationRateLayerDescriptor GetLayer (nuint layerIndex); + + [Export ("setLayer:atIndex:")] + void SetLayer ([NullAllowed] MTLRasterizationRateLayerDescriptor layer, nuint layerIndex); + +/* Selectors reported as missing by introspection: https://github.com/xamarin/maccore/issues/1980 + [Export ("layers")] + MTLRasterizationRateLayerArray Layers { get; } + + [Export ("screenSize", ArgumentSemantic.Assign)] + MTLSize ScreenSize { get; set; } + + [NullAllowed, Export ("label")] + string Label { get; set; } + + [Export ("layerCount")] + nuint LayerCount { get; } +*/ + } + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface MTLRasterizationRateLayerDescriptor : NSCopying { + + [Export ("initWithSampleCount:")] + [DesignatedInitializer] + IntPtr Constructor (MTLSize sampleCount); + + [Internal] + [Export ("initWithSampleCount:horizontal:vertical:")] + IntPtr Constructor (MTLSize sampleCount, IntPtr horizontal, IntPtr vertical); + +/* Selectors reported as not working by introspection: https://github.com/xamarin/maccore/issues/1976 + [Export ("sampleCount")] + MTLSize SampleCount { get; } + + [Internal] + [Export ("horizontalSampleStorage")] + IntPtr _HorizontalSampleStorage { get; } + + [Internal] + [Export ("verticalSampleStorage")] + IntPtr _VerticalSampleStorage { get; } + + [Export ("horizontal")] + MTLRasterizationRateSampleArray Horizontal { get; } + + [Export ("vertical")] + MTLRasterizationRateSampleArray Vertical { get; } + */ + } + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Advice ("This API is not available when using UIKit on macOS.")] + [BaseType (typeof(NSObject))] + interface MTLRasterizationRateLayerArray { + [Export ("objectAtIndexedSubscript:")] + [return: NullAllowed] + MTLRasterizationRateLayerDescriptor GetObject (nuint layerIndex); + + [Export ("setObject:atIndexedSubscript:")] + void SetObject ([NullAllowed] MTLRasterizationRateLayerDescriptor layer, nuint layerIndex); + } + + interface IMTLRasterizationRateMap {} + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac, NoTV, iOS (13,0)] + [Protocol, Advice ("This API is not available when using UIKit on macOS.")] + interface MTLRasterizationRateMap { + [Abstract] + [Export ("device")] + IMTLDevice Device { get; } + + [Abstract] + [NullAllowed, Export ("label")] + string Label { get; } + + [Abstract] + [Export ("screenSize")] + MTLSize ScreenSize { get; } + + [Abstract] + [Export ("physicalGranularity")] + MTLSize PhysicalGranularity { get; } + + [Abstract] + [Export ("layerCount")] + nuint LayerCount { get; } + + [Abstract] + [Export ("parameterBufferSizeAndAlign")] + MTLSizeAndAlign ParameterBufferSizeAndAlign { get; } + + [Abstract] + [Export ("copyParameterDataToBuffer:offset:")] + void CopyParameterData (IMTLBuffer buffer, nuint offset); + + [Abstract] + [Export ("physicalSizeForLayer:")] + MTLSize GetPhysicalSize (nuint layerIndex); + + [Abstract] + [Export ("mapScreenToPhysicalCoordinates:forLayer:")] + MTLCoordinate2D MapScreenToPhysicalCoordinates (MTLCoordinate2D screenCoordinates, nuint layerIndex); + + [Abstract] + [Export ("mapPhysicalToScreenCoordinates:forLayer:")] + MTLCoordinate2D MapPhysicalToScreenCoordinates (MTLCoordinate2D physicalCoordinates, nuint layerIndex); + } + + interface IMTLResourceStateCommandEncoder {} + + [NoMac, iOS (13,0), NoTV] + [Protocol] + interface MTLResourceStateCommandEncoder : MTLCommandEncoder { + [Unavailable (PlatformName.MacCatalyst)] + [NoMac] + [Advice ("This API is not available when using UIKit on macOS."), Abstract] + [Export ("updateTextureMappings:mode:regions:mipLevels:slices:numRegions:")] + void Update (IMTLTexture texture, MTLSparseTextureMappingMode mode, IntPtr regions, IntPtr mipLevels, IntPtr slices, nuint numRegions); + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac] + [Advice ("This API is not available when using UIKit on macOS."), Abstract] + [Export ("updateTextureMapping:mode:region:mipLevel:slice:")] + void Update (IMTLTexture texture, MTLSparseTextureMappingMode mode, MTLRegion region, nuint mipLevel, nuint slice); + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac] + [Advice ("This API is not available when using UIKit on macOS."), Abstract] + [Export ("updateTextureMapping:mode:indirectBuffer:indirectBufferOffset:")] + void Update (IMTLTexture texture, MTLSparseTextureMappingMode mode, IMTLBuffer indirectBuffer, nuint indirectBufferOffset); + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac] + [Advice ("This API is not available when using UIKit on macOS."), Abstract] + [Export ("updateFence:")] + void Update (IMTLFence fence); + + [Unavailable (PlatformName.MacCatalyst)] + [NoMac] + [Advice ("This API is not available when using UIKit on macOS."), Abstract] + [Export ("waitForFence:")] + void Wait (IMTLFence fence); + } + + [Mac (10,15), iOS (13,0), TV (13,0)] + [BaseType (typeof(NSObject))] + interface MTLCaptureDescriptor : NSCopying { + [NullAllowed, Export ("captureObject", ArgumentSemantic.Strong)] + NSObject CaptureObject { get; set; } + + [Export ("destination", ArgumentSemantic.Assign)] + MTLCaptureDestination Destination { get; set; } + + [NullAllowed, Export ("outputURL", ArgumentSemantic.Copy)] + NSUrl OutputUrl { get; set; } + } + + interface IMTLIndirectComputeCommand {} + + [TV (13,0), iOS (13,0), NoMac] + [Protocol] + interface MTLIndirectComputeCommand { + [Abstract] + [Export ("setComputePipelineState:")] + void SetComputePipelineState (IMTLComputePipelineState pipelineState); + + [Abstract] + [Export ("setKernelBuffer:offset:atIndex:")] + void SetKernelBuffer (IMTLBuffer buffer, nuint offset, nuint index); + + [Abstract] + [Export ("concurrentDispatchThreadgroups:threadsPerThreadgroup:")] + void ConcurrentDispatchThreadgroups (MTLSize threadgroupsPerGrid, MTLSize threadsPerThreadgroup); + + [Abstract] + [Export ("concurrentDispatchThreads:threadsPerThreadgroup:")] + void ConcurrentDispatchThreads (MTLSize threadsPerGrid, MTLSize threadsPerThreadgroup); + + [Abstract] + [Export ("setBarrier")] + void SetBarrier (); + + [Abstract] + [Export ("clearBarrier")] + void ClearBarrier (); + + [Abstract] + [Export ("reset")] + void Reset (); + + [Abstract] + [Export ("setThreadgroupMemoryLength:atIndex:")] + void SetThreadgroupMemoryLength (nuint length, nuint index); + + [Abstract] + [Export ("setStageInRegion:")] + void SetStageInRegion (MTLRegion region); + } + + interface IMTLCounter {} + + [NoiOS, NoTV, Mac (10,15)] + [Protocol] + [BaseType (typeof(NSObject))] + interface MTLCounter { + [Abstract] + [Export ("name")] + string Name { get; } + } + + interface IMTLCounterSet {} + + [NoiOS, NoTV, Mac (10,15)] + [Protocol] + [BaseType (typeof(NSObject))] + interface MTLCounterSet { + [Abstract] + [Export ("name")] + string Name { get; } + + [Abstract] + [Export ("counters", ArgumentSemantic.Copy)] + IMTLCounter[] Counters { get; } + } + + interface IMTLCounterSampleBuffer {} + + [NoiOS, NoTV, Mac (10,15)] + [Protocol] + [BaseType (typeof(NSObject))] + interface MTLCounterSampleBuffer { + [Abstract] + [Export ("device")] + IMTLDevice Device { get; } + + [Abstract] + [Export ("label")] + string Label { get; } + + [Abstract] + [Export ("sampleCount")] + nuint SampleCount { get; } + + [Abstract] + [Export ("resolveCounterRange:")] + [return: NullAllowed] + NSData ResolveCounterRange (NSRange range); + } + + [NoiOS, NoTV, Mac (10,15)] + [BaseType (typeof(NSObject))] + interface MTLCounterSampleBufferDescriptor : NSCopying + { + [NoiOS, Mac (10, 15)] + [Export ("counterSet", ArgumentSemantic.Retain)] + IMTLCounterSet CounterSet { get; set; } + + [NoiOS, Mac (10, 15)] + [Export ("label")] + string Label { get; set; } + + [NoiOS, Mac (10, 15)] + [Export ("storageMode", ArgumentSemantic.Assign)] + MTLStorageMode StorageMode { get; set; } + + [NoiOS, Mac (10, 15)] + [Export ("sampleCount")] + nuint SampleCount { get; set; } + } } #endif diff --git a/src/scenekit.cs b/src/scenekit.cs index b3a849aa43..5378eb9ded 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -36,6 +36,7 @@ using ObjCRuntime; using NMatrix4 = global::OpenTK.NMatrix4; using NVector3 = global::OpenTK.NVector3; +using Vector3 = global::OpenTK.NVector3; using Vector4 = global::OpenTK.Vector4; using Quaternion = global::OpenTK.Quaternion; @@ -597,8 +598,39 @@ namespace SceneKit { [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] [Export ("screenSpaceAmbientOcclusionNormalThreshold")] nfloat ScreenSpaceAmbientOcclusionNormalThreshold { get; set; } - #endif + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("projectionTransformWithViewportSize:")] + SCNMatrix4 GetProjectionTransform (CGSize viewportSize); + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("bloomIterationCount")] + nint BloomIterationCount { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("bloomIterationSpread")] + nfloat BloomIterationSpread { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("grainIntensity")] + nfloat GrainIntensity { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("grainScale")] + nfloat GrainScale { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("grainIsColored")] + bool GrainIsColored { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("whiteBalanceTemperature")] + nfloat WhiteBalanceTemperature { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("whiteBalanceTint")] + nfloat WhiteBalanceTint { get; set; } } interface ISCNCameraControlConfiguration {} @@ -1135,6 +1167,10 @@ namespace SceneKit { [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [Field ("SCNHitTestOptionSearchMode")] NSString SearchModeKey { get; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Field ("SCNHitTestOptionIgnoreLightArea")] + NSString IgnoreLightAreaKey { get; } } [Watch (3,0)] @@ -1177,6 +1213,8 @@ namespace SceneKit { #if MONOMAC [iOS (8,0)] + [Deprecated (PlatformName.MacOSX, 10, 14, message: "OpenGL API deprecated, please use Metal instead.")] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] [BaseType (typeof (CAOpenGLLayer))] interface SCNLayer : SCNSceneRenderer, SCNTechniqueSupport { // We already pull in the Scene property from the SCNSceneRenderer protocol, no need to redefine it here. @@ -1340,6 +1378,83 @@ namespace SceneKit { [Export ("lightWithMDLLight:")] SCNLight FromModelLight (MDLLight mdllight); #endif + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("probeType", ArgumentSemantic.Assign)] + SCNLightProbeType ProbeType { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("probeUpdateType", ArgumentSemantic.Assign)] + SCNLightProbeUpdateType ProbeUpdateType { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("probeExtents", ArgumentSemantic.Assign)] + Vector3 ProbeExtents { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("probeOffset", ArgumentSemantic.Assign)] + Vector3 ProbeOffset { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("parallaxCorrectionEnabled")] + bool ParallaxCorrectionEnabled { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("parallaxExtentsFactor", ArgumentSemantic.Assign)] + Vector3 ParallaxExtentsFactor { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("parallaxCenterOffset", ArgumentSemantic.Assign)] + Vector3 ParallaxCenterOffset { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [NullAllowed, Export ("probeEnvironment")] + SCNMaterialProperty ProbeEnvironment { get; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("areaType", ArgumentSemantic.Assign)] + SCNLightAreaType AreaType { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("areaExtents", ArgumentSemantic.Assign)] + Vector3 AreaExtents { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [NullAllowed, Export ("areaPolygonVertices", ArgumentSemantic.Copy)] + NSValue[] AreaPolygonVertices { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("drawsArea")] + bool DrawsArea { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("doubleSided")] + bool DoubleSided { get; set; } } [Watch (3,0)] @@ -1365,6 +1480,10 @@ namespace SceneKit { [TV (10, 0), Mac (10, 12), iOS (10, 0)] [Field ("SCNLightTypeProbe")] NSString Probe { get; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Field ("SCNLightTypeArea")] + NSString Area { get; } } #if MONOMAC @@ -1413,6 +1532,10 @@ namespace SceneKit { [TV (10, 0), Mac (10, 12), iOS (10, 0)] [Field ("SCNLightingModelPhysicallyBased")] NSString PhysicallyBased { get; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Field ("SCNLightingModelShadowOnly")] + NSString ShadowOnly { get; } } [Watch (3,0)] @@ -1525,6 +1648,18 @@ namespace SceneKit { SCNColorMask ColorBufferWriteMask { get; set; } #endif + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("clearCoat")] + SCNMaterialProperty ClearCoat { get; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("clearCoatRoughness")] + SCNMaterialProperty ClearCoatRoughness { get; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("clearCoatNormal")] + SCNMaterialProperty ClearCoatNormal { get; } } [Watch (3,0)] @@ -1552,6 +1687,7 @@ namespace SceneKit { [Deprecated (PlatformName.iOS, 10, 0)] [Deprecated (PlatformName.MacOSX, 10, 12)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] [NoWatch, NoTV] [NullAllowed, Export ("borderColor", ArgumentSemantic.Retain)] NSObject BorderColor { get; set; } @@ -1625,6 +1761,8 @@ namespace SceneKit { bool IgnoreHiddenNodes { get; set; } SCNNode RootNode { get; set; } SCNHitTestSearchMode SearchMode { get; set; } + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + bool IgnoreLightArea { get; set; } } [Watch (3,0)] @@ -2362,6 +2500,7 @@ namespace SceneKit { [NoTV, NoWatch] #endif [Availability (Deprecated = Platform.Mac_10_10, Message = "Use the SCNProgram's Opaque property instead.")] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] [Export ("programIsOpaque:")] bool IsProgramOpaque (SCNProgram program); #endif @@ -2418,6 +2557,7 @@ namespace SceneKit { [Export ("render")] [Deprecated (PlatformName.MacOSX, 10, 11)] [Deprecated (PlatformName.iOS, 9, 0)] + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] void Render (); [Mac (10,10)] @@ -2620,6 +2760,22 @@ namespace SceneKit { [Export ("sceneWithMDLAsset:")] SCNScene FromAsset (MDLAsset asset); #endif + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("wantsScreenSpaceReflection")] + bool WantsScreenSpaceReflection { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("screenSpaceReflectionSampleCount")] + nint ScreenSpaceReflectionSampleCount { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("screenSpaceReflectionMaximumDistance")] + nfloat ScreenSpaceReflectionMaximumDistance { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("screenSpaceReflectionStride")] + nfloat ScreenSpaceReflectionStride { get; set; } } interface ISCNSceneExportDelegate { } @@ -3082,6 +3238,27 @@ namespace SceneKit { [NullAllowed, Export ("audioListener", ArgumentSemantic.Retain)] [DebuggerBrowsable (DebuggerBrowsableState.Never)] SCNNode AudioListener { get; set; } + +#if XAMCORE_4_0 + [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) +#endif + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("temporalAntialiasingEnabled")] + bool TemporalAntialiasingEnabled { [Bind ("isTemporalAntialiasingEnabled")] get; set; } + +#if XAMCORE_4_0 + [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) +#endif + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("currentViewport")] + CGRect CurrentViewport { get; } + +#if XAMCORE_4_0 + [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) +#endif + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("usesReverseZ")] + bool UsesReverseZ { get; set; } } [Watch (3,0)] @@ -3287,6 +3464,7 @@ namespace SceneKit { [Internal] // we'll make it public if there's a need for them (beside the strong dictionary we provide) interface SCNRenderingOptionsKeys { + [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] [Field ("SCNPreferredRenderingAPIKey")] NSString RenderingApiKey { get; } @@ -3329,12 +3507,16 @@ namespace SceneKit { bool AllowsCameraControl { get; set; } #if MONOMAC + [Deprecated (PlatformName.MacOSX, 10, 14, message: "OpenGL API deprecated, please use Metal instead.")] [Export ("openGLContext", ArgumentSemantic.Retain)] NSOpenGLContext OpenGLContext { get; set; } + [Deprecated (PlatformName.MacOSX, 10, 14, message: "OpenGL API deprecated, please use Metal instead.")] [Export ("pixelFormat", ArgumentSemantic.Retain)] NSOpenGLPixelFormat PixelFormat { get; set; } #elif !WATCH + [Deprecated (PlatformName.iOS, 12, 0, message: "OpenGL API deprecated, please use Metal instead.")] + [Deprecated (PlatformName.TvOS, 12, 0, message: "OpenGL API deprecated, please use Metal instead.")] [Export ("eaglContext", ArgumentSemantic.Retain)] #if XAMCORE_2_0 EAGLContext EAGLContext { get; set; } @@ -3388,6 +3570,10 @@ namespace SceneKit { [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] [Export ("rendersContinuously")] bool RendersContinuously { get; set; } + + [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] + [Export ("drawableResizesAsynchronously")] + bool DrawableResizesAsynchronously { get; set; } } #if XAMCORE_4_0 @@ -3894,6 +4080,13 @@ namespace SceneKit { [iOS (9,0)][Mac (10,11)] [Internal, Export ("setObject:forKeyedSubscript:")] void _SetObject ([NullAllowed] NSObject obj, INSCopying key); + +#if XAMCORE_2_0 // Metal is 64 bit only + [NoWatch] + [TV (13,0), Mac (10,15), iOS (13,0)] + [NullAllowed, Export ("library", ArgumentSemantic.Strong)] + IMTLLibrary Library { get; set; } +#endif } [Watch (3,0)] diff --git a/src/uikit.cs b/src/uikit.cs index f0f18e6e9d..eb9b5c3e7a 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -9103,14 +9103,17 @@ namespace UIKit { [Export ("backIndicatorTransitionMaskImage", ArgumentSemantic.Retain)] UIImage BackIndicatorTransitionMaskImage { get; set; } + [Appearance] [TV (13,0), iOS (13,0)] [Export ("standardAppearance", ArgumentSemantic.Copy)] UINavigationBarAppearance StandardAppearance { get; set; } + [Appearance] [TV (13,0), iOS (13,0)] [NullAllowed, Export ("compactAppearance", ArgumentSemantic.Copy)] UINavigationBarAppearance CompactAppearance { get; set; } + [Appearance] [TV (13,0), iOS (13,0)] [NullAllowed, Export ("scrollEdgeAppearance", ArgumentSemantic.Copy)] UINavigationBarAppearance ScrollEdgeAppearance { get; set; } @@ -11722,6 +11725,7 @@ namespace UIKit { [NullAllowed, Export ("unselectedItemTintColor", ArgumentSemantic.Copy)] UIColor UnselectedItemTintColor { get; set; } + [Appearance] [TV (13,0), iOS (13,0), NoWatch] [Export ("standardAppearance", ArgumentSemantic.Copy)] UITabBarAppearance StandardAppearance { get; set; } @@ -11940,6 +11944,7 @@ namespace UIKit { [Wrap ("new UIStringAttributes (_GetBadgeTextAttributes(state))")] UIStringAttributes GetBadgeTextAttributes (UIControlState state); + [Appearance] [TV (13, 0), iOS (13, 0)] [NullAllowed, Export ("standardAppearance", ArgumentSemantic.Copy)] UITabBarAppearance StandardAppearance { get; set; } diff --git a/tests/bcl-test/Info.plist b/tests/bcl-test/Info.plist index fb195c77f1..f90a3ca74f 100644 --- a/tests/bcl-test/Info.plist +++ b/tests/bcl-test/Info.plist @@ -13,7 +13,7 @@ LSRequiresIPhoneOS MinimumOSVersion - 6.0 + 7.0 UIDeviceFamily 1 diff --git a/tests/bcl-test/iOS-monotouch_corlib_xunit-test.dll.ignore b/tests/bcl-test/iOS-monotouch_corlib_xunit-test.dll.ignore index da2eb3c78d..a3ca266927 100644 --- a/tests/bcl-test/iOS-monotouch_corlib_xunit-test.dll.ignore +++ b/tests/bcl-test/iOS-monotouch_corlib_xunit-test.dll.ignore @@ -53,4 +53,4 @@ Platform32:System.Threading.Tasks.Tests.TaskRtTests_Core.TestTaskTConstruction_t Platform32:Test.TaskContinueWhenAnyTests.RunContinueWhenAnyTests # Test running out of memory -Platform32:System.Collections.Tests.BitArray_OperatorsTests.Xor_Operator(l: [False, True, False, True, False, ...], r: [True, True, True, True, True, ...], expected: [True, False, True, False, True, ...]) \ No newline at end of file +Platform32:System.Collections.Tests.BitArray_OperatorsTests.Xor_Operator(l: [False, True, False, True, False, ...], r: [True, True, True, True, True, ...], expected: [True, False, True, False, True, ...]) diff --git a/tests/common/Configuration.cs b/tests/common/Configuration.cs index eb533d1f26..5127b11c91 100644 --- a/tests/common/Configuration.cs +++ b/tests/common/Configuration.cs @@ -93,6 +93,8 @@ namespace Xamarin.Tests var version = Version.Parse (xcode_version); if (version >= max_version) continue; + if (version.Major == max_version.Major) + continue; if (min_version != null && version < min_version) continue; with_versions.Add (new Tuple (version, path)); diff --git a/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs b/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs index 03ef19a8fd..0df0e5f1b9 100644 --- a/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs +++ b/tests/monotouch-test/CoreBluetooth/CentralManagerTest.cs @@ -77,13 +77,16 @@ namespace MonoTouchFixtures.CoreBluetooth { CBCentralManager mgr; ManagerDelegate mgrDelegate; + CBUUID heartRateMonitorUUID; [SetUp] public void SetUp () { // iOS 13 and friends require bluetooth permission if (TestRuntime.CheckXcodeVersion (11, 0)) - TestRuntime.CheckBluetoothPermission (); + TestRuntime.CheckBluetoothPermission (); + //known UUID for a heart monitor, more common, we want to find something and make sure we do not crash + heartRateMonitorUUID = CBUUID.FromPartial (0x180D); // Required API is available in macOS 10.8, but it doesn't work (hangs in 10.8-10.9, randomly crashes in 10.10) on the bots. TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 11, throwIfOtherPlatform: false); var e = new AutoResetEvent (false); @@ -94,7 +97,8 @@ namespace MonoTouchFixtures.CoreBluetooth { [TearDown] public void TearDown () { - // should dispose the delegate + heartRateMonitorUUID?.Dispose (); + mgrDelegate?.Dispose (); // make sure that our delegate does not get messages after the mgr was disposed mgr?.Dispose (); } @@ -134,12 +138,12 @@ namespace MonoTouchFixtures.CoreBluetooth { Assert.Inconclusive ("Bluetooth is off and therefore the test cannot be ran. State == {0}.", mgr.State); if (TestRuntime.CheckXcodeVersion (7, 0)) { - using (var uuid = new NSUuid ("B9401000-F5F8-466E-AFF9-25556B57FE6D")) + // ToString in a CBUUID with true returns the full uuid which can be used to create a NSUuid + using (var uuid = new NSUuid (heartRateMonitorUUID.ToString (true))) mgr.RetrievePeripheralsWithIdentifiers (uuid); } else { // that API was deprecated in 7.0 and removed from 9.0 - using (var uuid = CBUUID.FromString ("B9401000-F5F8-466E-AFF9-25556B57FE6D")) - mgr.RetrievePeripherals (uuid); + mgr.RetrievePeripherals (heartRateMonitorUUID); } } #endif // !XAMCORE_3_0 diff --git a/tests/monotouch-test/System.Net.Http/MessageHandlers.cs b/tests/monotouch-test/System.Net.Http/MessageHandlers.cs index abe3832bbb..206e3a4ee3 100644 --- a/tests/monotouch-test/System.Net.Http/MessageHandlers.cs +++ b/tests/monotouch-test/System.Net.Http/MessageHandlers.cs @@ -214,6 +214,7 @@ namespace MonoTests.System.Net.Http Assert.Inconclusive ("Request timedout."); } else { // assert the exception type + Assert.IsNotNull (ex, (result == null)? "Expected exception is missing and got no result" : $"Expected exception but got {result.Content.ReadAsStringAsync ().Result}"); Assert.IsInstanceOfType (typeof (HttpRequestException), ex); Assert.IsNotNull (ex.InnerException); Assert.IsInstanceOfType (typeof (WebException), ex.InnerException); diff --git a/tests/xtro-sharpie/common-Metal.ignore b/tests/xtro-sharpie/common-Metal.ignore index b71377e1ce..b18f8299d3 100644 --- a/tests/xtro-sharpie/common-Metal.ignore +++ b/tests/xtro-sharpie/common-Metal.ignore @@ -69,7 +69,30 @@ !incorrect-protocol-member! MTLResource::makeAliasable is REQUIRED and should be abstract !incorrect-protocol-member! MTLTexture::iosurface is REQUIRED and should be abstract !incorrect-protocol-member! MTLTexture::iosurfacePlane is REQUIRED and should be abstract - +!incorrect-protocol-member! MTLHeap::hazardTrackingMode is REQUIRED and should be abstract +!incorrect-protocol-member! MTLHeap::newBufferWithLength:options:offset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLHeap::newTextureWithDescriptor:offset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLHeap::resourceOptions is REQUIRED and should be abstract +!incorrect-protocol-member! MTLHeap::type is REQUIRED and should be abstract +!incorrect-protocol-member! MTLIndirectCommandBuffer::indirectComputeCommandAtIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLIndirectRenderCommand::setRenderPipelineState: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLResource::hazardTrackingMode is REQUIRED and should be abstract +!incorrect-protocol-member! MTLResource::heapOffset is REQUIRED and should be abstract +!incorrect-protocol-member! MTLResource::resourceOptions is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::useHeap:stages: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::useHeaps:count:stages: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::useResource:usage:stages: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::useResources:count:usage:stages: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::newTextureViewWithPixelFormat:textureType:levels:slices:swizzle: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::swizzle is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::copyFromTexture:toTexture: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::executeCommandsInBuffer:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newSharedTextureWithHandle: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsFamily: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setRenderPipelineStates:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::hasUnifiedMemory is REQUIRED and should be abstract ## unsorted diff --git a/tests/xtro-sharpie/common-SceneKit.ignore b/tests/xtro-sharpie/common-SceneKit.ignore index ccf026df76..39a5aad738 100644 --- a/tests/xtro-sharpie/common-SceneKit.ignore +++ b/tests/xtro-sharpie/common-SceneKit.ignore @@ -19,6 +19,11 @@ !incorrect-protocol-member! SCNSceneRenderer::depthPixelFormat is REQUIRED and should be abstract !incorrect-protocol-member! SCNSceneRenderer::device is REQUIRED and should be abstract !incorrect-protocol-member! SCNSceneRenderer::stencilPixelFormat is REQUIRED and should be abstract +!incorrect-protocol-member! SCNSceneRenderer::currentViewport is REQUIRED and should be abstract +!incorrect-protocol-member! SCNSceneRenderer::isTemporalAntialiasingEnabled is REQUIRED and should be abstract +!incorrect-protocol-member! SCNSceneRenderer::setTemporalAntialiasingEnabled: is REQUIRED and should be abstract +!incorrect-protocol-member! SCNSceneRenderer::setUsesReverseZ: is REQUIRED and should be abstract +!incorrect-protocol-member! SCNSceneRenderer::usesReverseZ is REQUIRED and should be abstract ## same for SCNActionable, it is required member of a protocol added to XAMCORE_4_0 !incorrect-protocol-member! SCNActionable::actionKeys is REQUIRED and should be abstract @@ -80,6 +85,11 @@ !missing-selector! SCNNode::simdWorldRight not bound !missing-selector! SCNNode::simdWorldTransform not bound !missing-selector! SCNNode::simdWorldUp not bound +!missing-selector! SCNHitTestResult::simdLocalCoordinates not bound +!missing-selector! SCNHitTestResult::simdLocalNormal not bound +!missing-selector! SCNHitTestResult::simdModelTransform not bound +!missing-selector! SCNHitTestResult::simdWorldCoordinates not bound +!missing-selector! SCNHitTestResult::simdWorldNormal not bound ## untyped enum (SceneKitTypes.h) but described as the value of `code` for `NSError` which is an NSInteger !unknown-native-enum! SCNErrorCode bound diff --git a/tests/xtro-sharpie/iOS-Metal.ignore b/tests/xtro-sharpie/iOS-Metal.ignore index 5bee1230a5..8228750999 100644 --- a/tests/xtro-sharpie/iOS-Metal.ignore +++ b/tests/xtro-sharpie/iOS-Metal.ignore @@ -57,3 +57,50 @@ !incorrect-protocol-member! MTLArgumentEncoder::newArgumentEncoderForBufferAtIndex: is REQUIRED and should be abstract !incorrect-protocol-member! MTLArgumentEncoder::setIndirectCommandBuffer:atIndex: is REQUIRED and should be abstract !incorrect-protocol-member! MTLArgumentEncoder::setIndirectCommandBuffers:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLCommandBuffer::resourceStateCommandEncoder is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newRasterizationRateMapWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sparseTileSizeInBytes is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sparseTileSizeWithTextureType:pixelFormat:sampleCount: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsRasterizationRateMapWithLayerCount: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsVertexAmplificationCount: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::setVertexAmplificationCount:viewMappings: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::firstMipmapInTail is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::isSparse is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::tailSizeInBytes is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::getTextureAccessCounters:region:mipLevel:slice:resetCounters:countersBuffer:countersBufferOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::resetTextureAccessCounters:region:mipLevel:slice: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::isShareable is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::newSharedTextureHandle is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setRenderPipelineState:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::supportIndirectCommandBuffers is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newSharedTextureWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setComputePipelineState:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setComputePipelineStates:withRange: is REQUIRED and should be abstract + +# Selectors missing reported by introspection: https://github.com/xamarin/maccore/issues/1978 +!missing-selector! MTLHeapDescriptor::hazardTrackingMode not bound +!missing-selector! MTLHeapDescriptor::resourceOptions not bound +!missing-selector! MTLHeapDescriptor::setHazardTrackingMode: not bound +!missing-selector! MTLHeapDescriptor::setResourceOptions: not bound +!missing-selector! MTLHeapDescriptor::setType: not bound +!missing-selector! MTLHeapDescriptor::type not bound + +# Fails instrospection issue: https://github.com/xamarin/maccore/issues/1979 +!missing-selector! MTLIndirectCommandBufferDescriptor::maxKernelBufferBindCount not bound +!missing-selector! MTLIndirectCommandBufferDescriptor::setMaxKernelBufferBindCount: not bound + +# Selectors reported as not working by instrospection: https://github.com/xamarin/maccore/issues/1976 +!missing-selector! MTLRasterizationRateLayerDescriptor::horizontal not bound +!missing-selector! MTLRasterizationRateLayerDescriptor::horizontalSampleStorage not bound +!missing-selector! MTLRasterizationRateLayerDescriptor::sampleCount not bound +!missing-selector! MTLRasterizationRateLayerDescriptor::vertical not bound +!missing-selector! MTLRasterizationRateLayerDescriptor::verticalSampleStorage not bound + +# Selectors reported as missing by introspection: https://github.com/xamarin/maccore/issues/1980 +!missing-selector! MTLRasterizationRateMapDescriptor::label not bound +!missing-selector! MTLRasterizationRateMapDescriptor::layerCount not bound +!missing-selector! MTLRasterizationRateMapDescriptor::layers not bound +!missing-selector! MTLRasterizationRateMapDescriptor::screenSize not bound +!missing-selector! MTLRasterizationRateMapDescriptor::setLabel: not bound +!missing-selector! MTLRasterizationRateMapDescriptor::setScreenSize: not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/iOS-Metal.todo b/tests/xtro-sharpie/iOS-Metal.todo deleted file mode 100644 index a5f371e898..0000000000 --- a/tests/xtro-sharpie/iOS-Metal.todo +++ /dev/null @@ -1,120 +0,0 @@ -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithCommandQueue: missing a [Deprecated] attribute -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithDevice: missing a [Deprecated] attribute -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithScope: missing a [Deprecated] attribute -!missing-enum! MTLCaptureDestination not bound -!missing-enum! MTLCaptureError not bound -!missing-enum! MTLGPUFamily not bound -!missing-enum! MTLHazardTrackingMode not bound -!missing-enum! MTLHeapType not bound -!missing-enum! MTLTextureSwizzle not bound -!missing-field! MTLCaptureErrorDomain not bound -!missing-protocol! MTLIndirectComputeCommand not bound -!missing-protocol-member! MTLArgumentEncoder::setComputePipelineState:atIndex: not found -!missing-protocol-member! MTLArgumentEncoder::setComputePipelineStates:withRange: not found -!missing-protocol-member! MTLArgumentEncoder::setRenderPipelineState:atIndex: not found -!missing-protocol-member! MTLArgumentEncoder::setRenderPipelineStates:withRange: not found -!missing-protocol-member! MTLBlitCommandEncoder::copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount: not found -!missing-protocol-member! MTLBlitCommandEncoder::copyFromTexture:toTexture: not found -!missing-protocol-member! MTLComputeCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: not found -!missing-protocol-member! MTLComputeCommandEncoder::executeCommandsInBuffer:withRange: not found -!missing-protocol-member! MTLComputePipelineState::supportIndirectCommandBuffers not found -!missing-protocol-member! MTLDevice::hasUnifiedMemory not found -!missing-protocol-member! MTLDevice::newSharedTextureWithDescriptor: not found -!missing-protocol-member! MTLDevice::newSharedTextureWithHandle: not found -!missing-protocol-member! MTLDevice::supportsFamily: not found -!missing-protocol-member! MTLHeap::hazardTrackingMode not found -!missing-protocol-member! MTLHeap::newBufferWithLength:options:offset: not found -!missing-protocol-member! MTLHeap::newTextureWithDescriptor:offset: not found -!missing-protocol-member! MTLHeap::resourceOptions not found -!missing-protocol-member! MTLHeap::type not found -!missing-protocol-member! MTLIndirectCommandBuffer::indirectComputeCommandAtIndex: not found -!missing-protocol-member! MTLIndirectRenderCommand::setRenderPipelineState: not found -!missing-protocol-member! MTLRenderCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: not found -!missing-protocol-member! MTLRenderCommandEncoder::useHeap:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useHeaps:count:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useResource:usage:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useResources:count:usage:stages: not found -!missing-protocol-member! MTLResource::hazardTrackingMode not found -!missing-protocol-member! MTLResource::heapOffset not found -!missing-protocol-member! MTLResource::resourceOptions not found -!missing-protocol-member! MTLTexture::isShareable not found -!missing-protocol-member! MTLTexture::newSharedTextureHandle not found -!missing-protocol-member! MTLTexture::newTextureViewWithPixelFormat:textureType:levels:slices:swizzle: not found -!missing-protocol-member! MTLTexture::swizzle not found -!missing-selector! MTLCaptureDescriptor::captureObject not bound -!missing-selector! MTLCaptureDescriptor::destination not bound -!missing-selector! MTLCaptureDescriptor::outputURL not bound -!missing-selector! MTLCaptureDescriptor::setCaptureObject: not bound -!missing-selector! MTLCaptureDescriptor::setDestination: not bound -!missing-selector! MTLCaptureDescriptor::setOutputURL: not bound -!missing-selector! MTLCaptureManager::startCaptureWithDescriptor:error: not bound -!missing-selector! MTLCaptureManager::supportsDestination: not bound -!missing-selector! MTLComputePipelineDescriptor::setSupportIndirectCommandBuffers: not bound -!missing-selector! MTLComputePipelineDescriptor::supportIndirectCommandBuffers not bound -!missing-selector! MTLHeapDescriptor::hazardTrackingMode not bound -!missing-selector! MTLHeapDescriptor::resourceOptions not bound -!missing-selector! MTLHeapDescriptor::setHazardTrackingMode: not bound -!missing-selector! MTLHeapDescriptor::setResourceOptions: not bound -!missing-selector! MTLHeapDescriptor::setType: not bound -!missing-selector! MTLHeapDescriptor::type not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::inheritPipelineState not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::maxKernelBufferBindCount not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::setInheritPipelineState: not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::setMaxKernelBufferBindCount: not bound -!missing-selector! MTLSharedTextureHandle::device not bound -!missing-selector! MTLSharedTextureHandle::label not bound -!missing-selector! MTLTextureDescriptor::hazardTrackingMode not bound -!missing-selector! MTLTextureDescriptor::setHazardTrackingMode: not bound -!missing-selector! MTLTextureDescriptor::setSwizzle: not bound -!missing-selector! MTLTextureDescriptor::swizzle not bound -!missing-type! MTLCaptureDescriptor not bound -!missing-type! MTLSharedTextureHandle not bound -## appended from unclassified file -!missing-enum! MTLSparseTextureMappingMode not bound -!missing-enum! MTLSparseTextureRegionAlignmentMode not bound -!missing-protocol! MTLRasterizationRateMap not bound -!missing-protocol! MTLResourceStateCommandEncoder not bound -!missing-protocol-member! MTLBlitCommandEncoder::getTextureAccessCounters:region:mipLevel:slice:resetCounters:countersBuffer:countersBufferOffset: not found -!missing-protocol-member! MTLBlitCommandEncoder::resetTextureAccessCounters:region:mipLevel:slice: not found -!missing-protocol-member! MTLCommandBuffer::resourceStateCommandEncoder not found -!missing-protocol-member! MTLDevice::convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions: not found -!missing-protocol-member! MTLDevice::convertSparseTileRegions:toPixelRegions:withTileSize:numRegions: not found -!missing-protocol-member! MTLDevice::newRasterizationRateMapWithDescriptor: not found -!missing-protocol-member! MTLDevice::sparseTileSizeInBytes not found -!missing-protocol-member! MTLDevice::sparseTileSizeWithTextureType:pixelFormat:sampleCount: not found -!missing-protocol-member! MTLDevice::supportsRasterizationRateMapWithLayerCount: not found -!missing-protocol-member! MTLDevice::supportsVertexAmplificationCount: not found -!missing-protocol-member! MTLRenderCommandEncoder::setVertexAmplificationCount:viewMappings: not found -!missing-protocol-member! MTLTexture::firstMipmapInTail not found -!missing-protocol-member! MTLTexture::isSparse not found -!missing-protocol-member! MTLTexture::tailSizeInBytes not found -!missing-selector! +MTLRasterizationRateMapDescriptor::rasterizationRateMapDescriptorWithScreenSize: not bound -!missing-selector! +MTLRasterizationRateMapDescriptor::rasterizationRateMapDescriptorWithScreenSize:layer: not bound -!missing-selector! +MTLRasterizationRateMapDescriptor::rasterizationRateMapDescriptorWithScreenSize:layerCount:layers: not bound -!missing-selector! MTLRasterizationRateLayerArray::objectAtIndexedSubscript: not bound -!missing-selector! MTLRasterizationRateLayerArray::setObject:atIndexedSubscript: not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::horizontal not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::horizontalSampleStorage not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::initWithSampleCount: not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::initWithSampleCount:horizontal:vertical: not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::sampleCount not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::vertical not bound -!missing-selector! MTLRasterizationRateLayerDescriptor::verticalSampleStorage not bound -!missing-selector! MTLRasterizationRateMapDescriptor::label not bound -!missing-selector! MTLRasterizationRateMapDescriptor::layerAtIndex: not bound -!missing-selector! MTLRasterizationRateMapDescriptor::layerCount not bound -!missing-selector! MTLRasterizationRateMapDescriptor::layers not bound -!missing-selector! MTLRasterizationRateMapDescriptor::screenSize not bound -!missing-selector! MTLRasterizationRateMapDescriptor::setLabel: not bound -!missing-selector! MTLRasterizationRateMapDescriptor::setLayer:atIndex: not bound -!missing-selector! MTLRasterizationRateMapDescriptor::setScreenSize: not bound -!missing-selector! MTLRasterizationRateSampleArray::objectAtIndexedSubscript: not bound -!missing-selector! MTLRasterizationRateSampleArray::setObject:atIndexedSubscript: not bound -!missing-selector! MTLRenderPassDescriptor::rasterizationRateMap not bound -!missing-selector! MTLRenderPassDescriptor::setRasterizationRateMap: not bound -!missing-selector! MTLRenderPipelineDescriptor::maxVertexAmplificationCount not bound -!missing-selector! MTLRenderPipelineDescriptor::setMaxVertexAmplificationCount: not bound -!missing-type! MTLRasterizationRateLayerArray not bound -!missing-type! MTLRasterizationRateLayerDescriptor not bound -!missing-type! MTLRasterizationRateMapDescriptor not bound -!missing-type! MTLRasterizationRateSampleArray not bound diff --git a/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo b/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo index 4d7551537a..90959c716b 100644 --- a/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo +++ b/tests/xtro-sharpie/iOS-MetalPerformanceShaders.todo @@ -595,3 +595,5 @@ !missing-type! MPSTemporaryNDArray not bound !unknown-simd-type-mapping! The Simd type vector_uchar16 does not have a mapping to a managed type. Please add one in SimdCheck.cs !wrong-base-type! MPSTriangleAccelerationStructure expected MPSPolygonAccelerationStructure actual MPSAccelerationStructure +!missing-selector! MPSMatrix::offset not bound +!missing-selector! MPSVector::offset not bound diff --git a/tests/xtro-sharpie/iOS-SceneKit.todo b/tests/xtro-sharpie/iOS-SceneKit.todo deleted file mode 100644 index 84fbc62878..0000000000 --- a/tests/xtro-sharpie/iOS-SceneKit.todo +++ /dev/null @@ -1,71 +0,0 @@ -!deprecated-attribute-missing! SCNView::eaglContext missing a [Deprecated] attribute -!deprecated-attribute-missing! SCNView::setEaglContext: missing a [Deprecated] attribute -!missing-enum! SCNLightAreaType not bound -!missing-enum! SCNLightProbeType not bound -!missing-enum! SCNLightProbeUpdateType not bound -!missing-field! SCNHitTestOptionIgnoreLightArea not bound -!missing-field! SCNLightingModelShadowOnly not bound -!missing-field! SCNLightTypeArea not bound -!missing-protocol-member! SCNSceneRenderer::currentViewport not found -!missing-protocol-member! SCNSceneRenderer::isTemporalAntialiasingEnabled not found -!missing-protocol-member! SCNSceneRenderer::setTemporalAntialiasingEnabled: not found -!missing-protocol-member! SCNSceneRenderer::setUsesReverseZ: not found -!missing-protocol-member! SCNSceneRenderer::usesReverseZ not found -!missing-selector! SCNCamera::bloomIterationCount not bound -!missing-selector! SCNCamera::bloomIterationSpread not bound -!missing-selector! SCNCamera::grainIntensity not bound -!missing-selector! SCNCamera::grainIsColored not bound -!missing-selector! SCNCamera::grainScale not bound -!missing-selector! SCNCamera::projectionTransformWithViewportSize: not bound -!missing-selector! SCNCamera::setBloomIterationCount: not bound -!missing-selector! SCNCamera::setBloomIterationSpread: not bound -!missing-selector! SCNCamera::setGrainIntensity: not bound -!missing-selector! SCNCamera::setGrainIsColored: not bound -!missing-selector! SCNCamera::setGrainScale: not bound -!missing-selector! SCNCamera::setWhiteBalanceTemperature: not bound -!missing-selector! SCNCamera::setWhiteBalanceTint: not bound -!missing-selector! SCNCamera::whiteBalanceTemperature not bound -!missing-selector! SCNCamera::whiteBalanceTint not bound -!missing-selector! SCNHitTestResult::simdLocalCoordinates not bound -!missing-selector! SCNHitTestResult::simdLocalNormal not bound -!missing-selector! SCNHitTestResult::simdModelTransform not bound -!missing-selector! SCNHitTestResult::simdWorldCoordinates not bound -!missing-selector! SCNHitTestResult::simdWorldNormal not bound -!missing-selector! SCNLight::areaExtents not bound -!missing-selector! SCNLight::areaPolygonVertices not bound -!missing-selector! SCNLight::areaType not bound -!missing-selector! SCNLight::doubleSided not bound -!missing-selector! SCNLight::drawsArea not bound -!missing-selector! SCNLight::parallaxCenterOffset not bound -!missing-selector! SCNLight::parallaxCorrectionEnabled not bound -!missing-selector! SCNLight::parallaxExtentsFactor not bound -!missing-selector! SCNLight::probeEnvironment not bound -!missing-selector! SCNLight::probeExtents not bound -!missing-selector! SCNLight::probeOffset not bound -!missing-selector! SCNLight::probeType not bound -!missing-selector! SCNLight::probeUpdateType not bound -!missing-selector! SCNLight::setAreaExtents: not bound -!missing-selector! SCNLight::setAreaPolygonVertices: not bound -!missing-selector! SCNLight::setAreaType: not bound -!missing-selector! SCNLight::setDoubleSided: not bound -!missing-selector! SCNLight::setDrawsArea: not bound -!missing-selector! SCNLight::setParallaxCenterOffset: not bound -!missing-selector! SCNLight::setParallaxCorrectionEnabled: not bound -!missing-selector! SCNLight::setParallaxExtentsFactor: not bound -!missing-selector! SCNLight::setProbeExtents: not bound -!missing-selector! SCNLight::setProbeOffset: not bound -!missing-selector! SCNLight::setProbeType: not bound -!missing-selector! SCNLight::setProbeUpdateType: not bound -!missing-selector! SCNMaterial::clearCoat not bound -!missing-selector! SCNMaterial::clearCoatNormal not bound -!missing-selector! SCNMaterial::clearCoatRoughness not bound -!missing-selector! SCNScene::screenSpaceReflectionMaximumDistance not bound -!missing-selector! SCNScene::screenSpaceReflectionSampleCount not bound -!missing-selector! SCNScene::screenSpaceReflectionStride not bound -!missing-selector! SCNScene::setScreenSpaceReflectionMaximumDistance: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionSampleCount: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionStride: not bound -!missing-selector! SCNScene::setWantsScreenSpaceReflection: not bound -!missing-selector! SCNScene::wantsScreenSpaceReflection not bound -!missing-selector! SCNTechnique::library not bound -!missing-selector! SCNTechnique::setLibrary: not bound diff --git a/tests/xtro-sharpie/macOS-Metal.ignore b/tests/xtro-sharpie/macOS-Metal.ignore index 29b60e8c72..264ec31c71 100644 --- a/tests/xtro-sharpie/macOS-Metal.ignore +++ b/tests/xtro-sharpie/macOS-Metal.ignore @@ -19,7 +19,6 @@ !incorrect-protocol-member! MTLArgumentEncoder::setIndirectCommandBuffer:atIndex: is REQUIRED and should be abstract !incorrect-protocol-member! MTLArgumentEncoder::setIndirectCommandBuffers:withRange: is REQUIRED and should be abstract !incorrect-protocol-member! MTLArgumentEncoder::setRenderPipelineState:atIndex: is REQUIRED and should be abstract -!incorrect-protocol-member! MTLArgumentEncoder::setRenderPipelineStates:withRange: is REQUIRED and should be abstract !incorrect-protocol-member! MTLBlitCommandEncoder::copyIndirectCommandBuffer:sourceRange:destination:destinationIndex: is REQUIRED and should be abstract !incorrect-protocol-member! MTLBlitCommandEncoder::optimizeContentsForCPUAccess: is REQUIRED and should be abstract !incorrect-protocol-member! MTLBlitCommandEncoder::optimizeContentsForCPUAccess:slice:level: is REQUIRED and should be abstract @@ -48,6 +47,32 @@ !incorrect-protocol-member! MTLRenderPipelineState::supportIndirectCommandBuffers is REQUIRED and should be abstract !incorrect-protocol-member! MTLTexture::allowGPUOptimizedContents is REQUIRED and should be abstract !incorrect-protocol-member! MTLDevice::newSharedTextureWithDescriptor: is REQUIRED and should be abstract -!incorrect-protocol-member! MTLDevice::newSharedTextureWithHandle: is REQUIRED and should be abstract !incorrect-protocol-member! MTLTexture::isShareable is REQUIRED and should be abstract !incorrect-protocol-member! MTLTexture::newSharedTextureHandle is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::resolveCounters:inRange:destinationBuffer:destinationOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBlitCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBuffer::newRemoteBufferViewForDevice: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLBuffer::remoteStorageBuffer is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputeCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::areBarycentricCoordsSupported is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::counterSets is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::location is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::locationNumber is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::maxTransferRate is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newCounterSampleBufferWithDescriptor:error: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::peerCount is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::peerGroupID is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::peerIndex is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::sampleTimestamps:gpuTimestamp: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::supportsShaderBarycentricCoordinates is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::newRemoteTextureViewForDevice: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::remoteStorageTexture is REQUIRED and should be abstract + +# Selectors missing reported by introspection: https://github.com/xamarin/maccore/issues/1978 +!missing-selector! MTLHeapDescriptor::hazardTrackingMode not bound +!missing-selector! MTLHeapDescriptor::resourceOptions not bound +!missing-selector! MTLHeapDescriptor::setHazardTrackingMode: not bound +!missing-selector! MTLHeapDescriptor::setResourceOptions: not bound +!missing-selector! MTLHeapDescriptor::setType: not bound +!missing-selector! MTLHeapDescriptor::type not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/macOS-Metal.todo b/tests/xtro-sharpie/macOS-Metal.todo deleted file mode 100644 index 477354da09..0000000000 --- a/tests/xtro-sharpie/macOS-Metal.todo +++ /dev/null @@ -1,105 +0,0 @@ -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithCommandQueue: missing a [Deprecated] attribute -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithDevice: missing a [Deprecated] attribute -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithScope: missing a [Deprecated] attribute -!missing-enum! MTLCaptureDestination not bound -!missing-enum! MTLCaptureError not bound -!missing-enum! MTLCounterSampleBufferError not bound -!missing-enum! MTLDeviceLocation not bound -!missing-enum! MTLGPUFamily not bound -!missing-enum! MTLHazardTrackingMode not bound -!missing-enum! MTLHeapType not bound -!missing-enum! MTLTextureSwizzle not bound -!missing-field! MTLCaptureErrorDomain not bound -!missing-field! MTLCommonCounterClipperInvocations not bound -!missing-field! MTLCommonCounterClipperPrimitivesOut not bound -!missing-field! MTLCommonCounterComputeKernelInvocations not bound -!missing-field! MTLCommonCounterFragmentCycles not bound -!missing-field! MTLCommonCounterFragmentInvocations not bound -!missing-field! MTLCommonCounterFragmentsPassed not bound -!missing-field! MTLCommonCounterPostTessellationVertexCycles not bound -!missing-field! MTLCommonCounterPostTessellationVertexInvocations not bound -!missing-field! MTLCommonCounterRenderTargetWriteCycles not bound -!missing-field! MTLCommonCounterSetStageUtilization not bound -!missing-field! MTLCommonCounterSetStatistic not bound -!missing-field! MTLCommonCounterSetTimestamp not bound -!missing-field! MTLCommonCounterTessellationCycles not bound -!missing-field! MTLCommonCounterTessellationInputPatches not bound -!missing-field! MTLCommonCounterTimestamp not bound -!missing-field! MTLCommonCounterTotalCycles not bound -!missing-field! MTLCommonCounterVertexCycles not bound -!missing-field! MTLCommonCounterVertexInvocations not bound -!missing-field! MTLCounterErrorDomain not bound -!missing-protocol! MTLCounter not bound -!missing-protocol! MTLCounterSampleBuffer not bound -!missing-protocol! MTLCounterSet not bound -!missing-protocol-member! MTLBlitCommandEncoder::copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount: not found -!missing-protocol-member! MTLBlitCommandEncoder::copyFromTexture:toTexture: not found -!missing-protocol-member! MTLBlitCommandEncoder::resolveCounters:inRange:destinationBuffer:destinationOffset: not found -!missing-protocol-member! MTLBlitCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: not found -!missing-protocol-member! MTLBuffer::newRemoteBufferViewForDevice: not found -!missing-protocol-member! MTLBuffer::remoteStorageBuffer not found -!missing-protocol-member! MTLComputeCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: not found -!missing-protocol-member! MTLDevice::areBarycentricCoordsSupported not found -!missing-protocol-member! MTLDevice::counterSets not found -!missing-protocol-member! MTLDevice::hasUnifiedMemory not found -!missing-protocol-member! MTLDevice::location not found -!missing-protocol-member! MTLDevice::locationNumber not found -!missing-protocol-member! MTLDevice::maxTransferRate not found -!missing-protocol-member! MTLDevice::newCounterSampleBufferWithDescriptor:error: not found -!missing-protocol-member! MTLDevice::peerCount not found -!missing-protocol-member! MTLDevice::peerGroupID not found -!missing-protocol-member! MTLDevice::peerIndex not found -!missing-protocol-member! MTLDevice::sampleTimestamps:gpuTimestamp: not found -!missing-protocol-member! MTLDevice::supportsFamily: not found -!missing-protocol-member! MTLDevice::supportsShaderBarycentricCoordinates not found -!missing-protocol-member! MTLHeap::hazardTrackingMode not found -!missing-protocol-member! MTLHeap::newBufferWithLength:options:offset: not found -!missing-protocol-member! MTLHeap::newTextureWithDescriptor:offset: not found -!missing-protocol-member! MTLHeap::resourceOptions not found -!missing-protocol-member! MTLHeap::type not found -!missing-protocol-member! MTLRenderCommandEncoder::sampleCountersInBuffer:atSampleIndex:withBarrier: not found -!missing-protocol-member! MTLRenderCommandEncoder::useHeap:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useHeaps:count:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useResource:usage:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useResources:count:usage:stages: not found -!missing-protocol-member! MTLResource::hazardTrackingMode not found -!missing-protocol-member! MTLResource::heapOffset not found -!missing-protocol-member! MTLResource::resourceOptions not found -!missing-protocol-member! MTLTexture::newRemoteTextureViewForDevice: not found -!missing-protocol-member! MTLTexture::newTextureViewWithPixelFormat:textureType:levels:slices:swizzle: not found -!missing-protocol-member! MTLTexture::remoteStorageTexture not found -!missing-protocol-member! MTLTexture::swizzle not found -!missing-selector! MTLCaptureDescriptor::captureObject not bound -!missing-selector! MTLCaptureDescriptor::destination not bound -!missing-selector! MTLCaptureDescriptor::outputURL not bound -!missing-selector! MTLCaptureDescriptor::setCaptureObject: not bound -!missing-selector! MTLCaptureDescriptor::setDestination: not bound -!missing-selector! MTLCaptureDescriptor::setOutputURL: not bound -!missing-selector! MTLCaptureManager::startCaptureWithDescriptor:error: not bound -!missing-selector! MTLCaptureManager::supportsDestination: not bound -!missing-selector! MTLCounterSampleBufferDescriptor::counterSet not bound -!missing-selector! MTLCounterSampleBufferDescriptor::label not bound -!missing-selector! MTLCounterSampleBufferDescriptor::sampleCount not bound -!missing-selector! MTLCounterSampleBufferDescriptor::setCounterSet: not bound -!missing-selector! MTLCounterSampleBufferDescriptor::setLabel: not bound -!missing-selector! MTLCounterSampleBufferDescriptor::setSampleCount: not bound -!missing-selector! MTLCounterSampleBufferDescriptor::setStorageMode: not bound -!missing-selector! MTLCounterSampleBufferDescriptor::storageMode not bound -!missing-selector! MTLHeapDescriptor::hazardTrackingMode not bound -!missing-selector! MTLHeapDescriptor::resourceOptions not bound -!missing-selector! MTLHeapDescriptor::setHazardTrackingMode: not bound -!missing-selector! MTLHeapDescriptor::setResourceOptions: not bound -!missing-selector! MTLHeapDescriptor::setType: not bound -!missing-selector! MTLHeapDescriptor::type not bound -!missing-selector! MTLRenderPassDescriptor::defaultRasterSampleCount not bound -!missing-selector! MTLRenderPassDescriptor::renderTargetHeight not bound -!missing-selector! MTLRenderPassDescriptor::renderTargetWidth not bound -!missing-selector! MTLRenderPassDescriptor::setDefaultRasterSampleCount: not bound -!missing-selector! MTLRenderPassDescriptor::setRenderTargetHeight: not bound -!missing-selector! MTLRenderPassDescriptor::setRenderTargetWidth: not bound -!missing-selector! MTLTextureDescriptor::hazardTrackingMode not bound -!missing-selector! MTLTextureDescriptor::setHazardTrackingMode: not bound -!missing-selector! MTLTextureDescriptor::setSwizzle: not bound -!missing-selector! MTLTextureDescriptor::swizzle not bound -!missing-type! MTLCaptureDescriptor not bound -!missing-type! MTLCounterSampleBufferDescriptor not bound diff --git a/tests/xtro-sharpie/macOS-SceneKit.todo b/tests/xtro-sharpie/macOS-SceneKit.todo deleted file mode 100644 index 87471994f4..0000000000 --- a/tests/xtro-sharpie/macOS-SceneKit.todo +++ /dev/null @@ -1,76 +0,0 @@ -!deprecated-attribute-missing! SCNLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! SCNView::openGLContext missing a [Deprecated] attribute -!deprecated-attribute-missing! SCNView::pixelFormat missing a [Deprecated] attribute -!deprecated-attribute-missing! SCNView::setOpenGLContext: missing a [Deprecated] attribute -!deprecated-attribute-missing! SCNView::setPixelFormat: missing a [Deprecated] attribute -!missing-enum! SCNLightAreaType not bound -!missing-enum! SCNLightProbeType not bound -!missing-enum! SCNLightProbeUpdateType not bound -!missing-field! SCNHitTestOptionIgnoreLightArea not bound -!missing-field! SCNLightingModelShadowOnly not bound -!missing-field! SCNLightTypeArea not bound -!missing-protocol-member! SCNSceneRenderer::currentViewport not found -!missing-protocol-member! SCNSceneRenderer::isTemporalAntialiasingEnabled not found -!missing-protocol-member! SCNSceneRenderer::setTemporalAntialiasingEnabled: not found -!missing-protocol-member! SCNSceneRenderer::setUsesReverseZ: not found -!missing-protocol-member! SCNSceneRenderer::usesReverseZ not found -!missing-selector! SCNCamera::bloomIterationCount not bound -!missing-selector! SCNCamera::bloomIterationSpread not bound -!missing-selector! SCNCamera::grainIntensity not bound -!missing-selector! SCNCamera::grainIsColored not bound -!missing-selector! SCNCamera::grainScale not bound -!missing-selector! SCNCamera::projectionTransformWithViewportSize: not bound -!missing-selector! SCNCamera::setBloomIterationCount: not bound -!missing-selector! SCNCamera::setBloomIterationSpread: not bound -!missing-selector! SCNCamera::setGrainIntensity: not bound -!missing-selector! SCNCamera::setGrainIsColored: not bound -!missing-selector! SCNCamera::setGrainScale: not bound -!missing-selector! SCNCamera::setWhiteBalanceTemperature: not bound -!missing-selector! SCNCamera::setWhiteBalanceTint: not bound -!missing-selector! SCNCamera::whiteBalanceTemperature not bound -!missing-selector! SCNCamera::whiteBalanceTint not bound -!missing-selector! SCNHitTestResult::simdLocalCoordinates not bound -!missing-selector! SCNHitTestResult::simdLocalNormal not bound -!missing-selector! SCNHitTestResult::simdModelTransform not bound -!missing-selector! SCNHitTestResult::simdWorldCoordinates not bound -!missing-selector! SCNHitTestResult::simdWorldNormal not bound -!missing-selector! SCNLight::areaExtents not bound -!missing-selector! SCNLight::areaPolygonVertices not bound -!missing-selector! SCNLight::areaType not bound -!missing-selector! SCNLight::doubleSided not bound -!missing-selector! SCNLight::drawsArea not bound -!missing-selector! SCNLight::parallaxCenterOffset not bound -!missing-selector! SCNLight::parallaxCorrectionEnabled not bound -!missing-selector! SCNLight::parallaxExtentsFactor not bound -!missing-selector! SCNLight::probeEnvironment not bound -!missing-selector! SCNLight::probeExtents not bound -!missing-selector! SCNLight::probeOffset not bound -!missing-selector! SCNLight::probeType not bound -!missing-selector! SCNLight::probeUpdateType not bound -!missing-selector! SCNLight::setAreaExtents: not bound -!missing-selector! SCNLight::setAreaPolygonVertices: not bound -!missing-selector! SCNLight::setAreaType: not bound -!missing-selector! SCNLight::setDoubleSided: not bound -!missing-selector! SCNLight::setDrawsArea: not bound -!missing-selector! SCNLight::setParallaxCenterOffset: not bound -!missing-selector! SCNLight::setParallaxCorrectionEnabled: not bound -!missing-selector! SCNLight::setParallaxExtentsFactor: not bound -!missing-selector! SCNLight::setProbeExtents: not bound -!missing-selector! SCNLight::setProbeOffset: not bound -!missing-selector! SCNLight::setProbeType: not bound -!missing-selector! SCNLight::setProbeUpdateType: not bound -!missing-selector! SCNMaterial::clearCoat not bound -!missing-selector! SCNMaterial::clearCoatNormal not bound -!missing-selector! SCNMaterial::clearCoatRoughness not bound -!missing-selector! SCNScene::screenSpaceReflectionMaximumDistance not bound -!missing-selector! SCNScene::screenSpaceReflectionSampleCount not bound -!missing-selector! SCNScene::screenSpaceReflectionStride not bound -!missing-selector! SCNScene::setScreenSpaceReflectionMaximumDistance: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionSampleCount: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionStride: not bound -!missing-selector! SCNScene::setWantsScreenSpaceReflection: not bound -!missing-selector! SCNScene::wantsScreenSpaceReflection not bound -!missing-selector! SCNTechnique::library not bound -!missing-selector! SCNTechnique::setLibrary: not bound -!missing-selector! SCNView::drawableResizesAsynchronously not bound -!missing-selector! SCNView::setDrawableResizesAsynchronously: not bound diff --git a/tests/xtro-sharpie/tvOS-Metal.ignore b/tests/xtro-sharpie/tvOS-Metal.ignore index 59da635447..8c265fbd4a 100644 --- a/tests/xtro-sharpie/tvOS-Metal.ignore +++ b/tests/xtro-sharpie/tvOS-Metal.ignore @@ -29,3 +29,23 @@ !incorrect-protocol-member! MTLArgumentEncoder::newArgumentEncoderForBufferAtIndex: is REQUIRED and should be abstract !incorrect-protocol-member! MTLArgumentEncoder::setIndirectCommandBuffer:atIndex: is REQUIRED and should be abstract !incorrect-protocol-member! MTLArgumentEncoder::setIndirectCommandBuffers:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLDevice::newSharedTextureWithDescriptor: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setRenderPipelineState:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLComputePipelineState::supportIndirectCommandBuffers is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setComputePipelineState:atIndex: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLArgumentEncoder::setComputePipelineStates:withRange: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLRenderCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::isShareable is REQUIRED and should be abstract +!incorrect-protocol-member! MTLTexture::newSharedTextureHandle is REQUIRED and should be abstract + +# Selectors missing reported by introspection: https://github.com/xamarin/maccore/issues/1978 +!missing-selector! MTLHeapDescriptor::hazardTrackingMode not bound +!missing-selector! MTLHeapDescriptor::resourceOptions not bound +!missing-selector! MTLHeapDescriptor::setHazardTrackingMode: not bound +!missing-selector! MTLHeapDescriptor::setResourceOptions: not bound +!missing-selector! MTLHeapDescriptor::setType: not bound +!missing-selector! MTLHeapDescriptor::type not bound + +# Fails instrospection issue: https://github.com/xamarin/maccore/issues/1979 +!missing-selector! MTLIndirectCommandBufferDescriptor::maxKernelBufferBindCount not bound +!missing-selector! MTLIndirectCommandBufferDescriptor::setMaxKernelBufferBindCount: not bound diff --git a/tests/xtro-sharpie/tvOS-Metal.todo b/tests/xtro-sharpie/tvOS-Metal.todo deleted file mode 100644 index 492d7b94e5..0000000000 --- a/tests/xtro-sharpie/tvOS-Metal.todo +++ /dev/null @@ -1,72 +0,0 @@ -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithCommandQueue: missing a [Deprecated] attribute -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithDevice: missing a [Deprecated] attribute -!deprecated-attribute-missing! MTLCaptureManager::startCaptureWithScope: missing a [Deprecated] attribute -!missing-enum! MTLCaptureDestination not bound -!missing-enum! MTLCaptureError not bound -!missing-enum! MTLGPUFamily not bound -!missing-enum! MTLHazardTrackingMode not bound -!missing-enum! MTLHeapType not bound -!missing-enum! MTLPrimitiveTopologyClass not bound -!missing-enum! MTLTextureSwizzle not bound -!missing-field! MTLCaptureErrorDomain not bound -!missing-protocol! MTLIndirectComputeCommand not bound -!missing-protocol-member! MTLArgumentEncoder::setComputePipelineState:atIndex: not found -!missing-protocol-member! MTLArgumentEncoder::setComputePipelineStates:withRange: not found -!missing-protocol-member! MTLArgumentEncoder::setRenderPipelineState:atIndex: not found -!missing-protocol-member! MTLArgumentEncoder::setRenderPipelineStates:withRange: not found -!missing-protocol-member! MTLBlitCommandEncoder::copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount: not found -!missing-protocol-member! MTLBlitCommandEncoder::copyFromTexture:toTexture: not found -!missing-protocol-member! MTLComputeCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: not found -!missing-protocol-member! MTLComputeCommandEncoder::executeCommandsInBuffer:withRange: not found -!missing-protocol-member! MTLComputePipelineState::supportIndirectCommandBuffers not found -!missing-protocol-member! MTLDevice::hasUnifiedMemory not found -!missing-protocol-member! MTLDevice::newSharedTextureWithDescriptor: not found -!missing-protocol-member! MTLDevice::newSharedTextureWithHandle: not found -!missing-protocol-member! MTLDevice::supportsFamily: not found -!missing-protocol-member! MTLHeap::hazardTrackingMode not found -!missing-protocol-member! MTLHeap::newBufferWithLength:options:offset: not found -!missing-protocol-member! MTLHeap::newTextureWithDescriptor:offset: not found -!missing-protocol-member! MTLHeap::resourceOptions not found -!missing-protocol-member! MTLHeap::type not found -!missing-protocol-member! MTLIndirectCommandBuffer::indirectComputeCommandAtIndex: not found -!missing-protocol-member! MTLIndirectRenderCommand::setRenderPipelineState: not found -!missing-protocol-member! MTLRenderCommandEncoder::executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: not found -!missing-protocol-member! MTLRenderCommandEncoder::useHeap:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useHeaps:count:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useResource:usage:stages: not found -!missing-protocol-member! MTLRenderCommandEncoder::useResources:count:usage:stages: not found -!missing-protocol-member! MTLResource::hazardTrackingMode not found -!missing-protocol-member! MTLResource::heapOffset not found -!missing-protocol-member! MTLResource::resourceOptions not found -!missing-protocol-member! MTLTexture::isShareable not found -!missing-protocol-member! MTLTexture::newSharedTextureHandle not found -!missing-protocol-member! MTLTexture::newTextureViewWithPixelFormat:textureType:levels:slices:swizzle: not found -!missing-protocol-member! MTLTexture::swizzle not found -!missing-selector! MTLCaptureDescriptor::captureObject not bound -!missing-selector! MTLCaptureDescriptor::destination not bound -!missing-selector! MTLCaptureDescriptor::outputURL not bound -!missing-selector! MTLCaptureDescriptor::setCaptureObject: not bound -!missing-selector! MTLCaptureDescriptor::setDestination: not bound -!missing-selector! MTLCaptureDescriptor::setOutputURL: not bound -!missing-selector! MTLCaptureManager::startCaptureWithDescriptor:error: not bound -!missing-selector! MTLCaptureManager::supportsDestination: not bound -!missing-selector! MTLComputePipelineDescriptor::setSupportIndirectCommandBuffers: not bound -!missing-selector! MTLComputePipelineDescriptor::supportIndirectCommandBuffers not bound -!missing-selector! MTLHeapDescriptor::hazardTrackingMode not bound -!missing-selector! MTLHeapDescriptor::resourceOptions not bound -!missing-selector! MTLHeapDescriptor::setHazardTrackingMode: not bound -!missing-selector! MTLHeapDescriptor::setResourceOptions: not bound -!missing-selector! MTLHeapDescriptor::setType: not bound -!missing-selector! MTLHeapDescriptor::type not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::inheritPipelineState not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::maxKernelBufferBindCount not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::setInheritPipelineState: not bound -!missing-selector! MTLIndirectCommandBufferDescriptor::setMaxKernelBufferBindCount: not bound -!missing-selector! MTLSharedTextureHandle::device not bound -!missing-selector! MTLSharedTextureHandle::label not bound -!missing-selector! MTLTextureDescriptor::hazardTrackingMode not bound -!missing-selector! MTLTextureDescriptor::setHazardTrackingMode: not bound -!missing-selector! MTLTextureDescriptor::setSwizzle: not bound -!missing-selector! MTLTextureDescriptor::swizzle not bound -!missing-type! MTLCaptureDescriptor not bound -!missing-type! MTLSharedTextureHandle not bound diff --git a/tests/xtro-sharpie/tvOS-SceneKit.todo b/tests/xtro-sharpie/tvOS-SceneKit.todo deleted file mode 100644 index 84fbc62878..0000000000 --- a/tests/xtro-sharpie/tvOS-SceneKit.todo +++ /dev/null @@ -1,71 +0,0 @@ -!deprecated-attribute-missing! SCNView::eaglContext missing a [Deprecated] attribute -!deprecated-attribute-missing! SCNView::setEaglContext: missing a [Deprecated] attribute -!missing-enum! SCNLightAreaType not bound -!missing-enum! SCNLightProbeType not bound -!missing-enum! SCNLightProbeUpdateType not bound -!missing-field! SCNHitTestOptionIgnoreLightArea not bound -!missing-field! SCNLightingModelShadowOnly not bound -!missing-field! SCNLightTypeArea not bound -!missing-protocol-member! SCNSceneRenderer::currentViewport not found -!missing-protocol-member! SCNSceneRenderer::isTemporalAntialiasingEnabled not found -!missing-protocol-member! SCNSceneRenderer::setTemporalAntialiasingEnabled: not found -!missing-protocol-member! SCNSceneRenderer::setUsesReverseZ: not found -!missing-protocol-member! SCNSceneRenderer::usesReverseZ not found -!missing-selector! SCNCamera::bloomIterationCount not bound -!missing-selector! SCNCamera::bloomIterationSpread not bound -!missing-selector! SCNCamera::grainIntensity not bound -!missing-selector! SCNCamera::grainIsColored not bound -!missing-selector! SCNCamera::grainScale not bound -!missing-selector! SCNCamera::projectionTransformWithViewportSize: not bound -!missing-selector! SCNCamera::setBloomIterationCount: not bound -!missing-selector! SCNCamera::setBloomIterationSpread: not bound -!missing-selector! SCNCamera::setGrainIntensity: not bound -!missing-selector! SCNCamera::setGrainIsColored: not bound -!missing-selector! SCNCamera::setGrainScale: not bound -!missing-selector! SCNCamera::setWhiteBalanceTemperature: not bound -!missing-selector! SCNCamera::setWhiteBalanceTint: not bound -!missing-selector! SCNCamera::whiteBalanceTemperature not bound -!missing-selector! SCNCamera::whiteBalanceTint not bound -!missing-selector! SCNHitTestResult::simdLocalCoordinates not bound -!missing-selector! SCNHitTestResult::simdLocalNormal not bound -!missing-selector! SCNHitTestResult::simdModelTransform not bound -!missing-selector! SCNHitTestResult::simdWorldCoordinates not bound -!missing-selector! SCNHitTestResult::simdWorldNormal not bound -!missing-selector! SCNLight::areaExtents not bound -!missing-selector! SCNLight::areaPolygonVertices not bound -!missing-selector! SCNLight::areaType not bound -!missing-selector! SCNLight::doubleSided not bound -!missing-selector! SCNLight::drawsArea not bound -!missing-selector! SCNLight::parallaxCenterOffset not bound -!missing-selector! SCNLight::parallaxCorrectionEnabled not bound -!missing-selector! SCNLight::parallaxExtentsFactor not bound -!missing-selector! SCNLight::probeEnvironment not bound -!missing-selector! SCNLight::probeExtents not bound -!missing-selector! SCNLight::probeOffset not bound -!missing-selector! SCNLight::probeType not bound -!missing-selector! SCNLight::probeUpdateType not bound -!missing-selector! SCNLight::setAreaExtents: not bound -!missing-selector! SCNLight::setAreaPolygonVertices: not bound -!missing-selector! SCNLight::setAreaType: not bound -!missing-selector! SCNLight::setDoubleSided: not bound -!missing-selector! SCNLight::setDrawsArea: not bound -!missing-selector! SCNLight::setParallaxCenterOffset: not bound -!missing-selector! SCNLight::setParallaxCorrectionEnabled: not bound -!missing-selector! SCNLight::setParallaxExtentsFactor: not bound -!missing-selector! SCNLight::setProbeExtents: not bound -!missing-selector! SCNLight::setProbeOffset: not bound -!missing-selector! SCNLight::setProbeType: not bound -!missing-selector! SCNLight::setProbeUpdateType: not bound -!missing-selector! SCNMaterial::clearCoat not bound -!missing-selector! SCNMaterial::clearCoatNormal not bound -!missing-selector! SCNMaterial::clearCoatRoughness not bound -!missing-selector! SCNScene::screenSpaceReflectionMaximumDistance not bound -!missing-selector! SCNScene::screenSpaceReflectionSampleCount not bound -!missing-selector! SCNScene::screenSpaceReflectionStride not bound -!missing-selector! SCNScene::setScreenSpaceReflectionMaximumDistance: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionSampleCount: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionStride: not bound -!missing-selector! SCNScene::setWantsScreenSpaceReflection: not bound -!missing-selector! SCNScene::wantsScreenSpaceReflection not bound -!missing-selector! SCNTechnique::library not bound -!missing-selector! SCNTechnique::setLibrary: not bound diff --git a/tests/xtro-sharpie/watchOS-SceneKit.ignore b/tests/xtro-sharpie/watchOS-SceneKit.ignore index 4966cb315d..d950d5de31 100644 --- a/tests/xtro-sharpie/watchOS-SceneKit.ignore +++ b/tests/xtro-sharpie/watchOS-SceneKit.ignore @@ -9,3 +9,6 @@ !missing-selector! SCNNode::rendererDelegate not bound !missing-selector! SCNNode::setRendererDelegate: not bound !missing-selector! SCNTechnique::handleBindingOfSymbol:usingBlock: not bound + +## obsoleted (removed from headers) in watchOS 6 +!extra-protocol-member! unexpected selector SCNSceneRenderer::context found \ No newline at end of file diff --git a/tests/xtro-sharpie/watchOS-SceneKit.todo b/tests/xtro-sharpie/watchOS-SceneKit.todo deleted file mode 100644 index 2487f850c3..0000000000 --- a/tests/xtro-sharpie/watchOS-SceneKit.todo +++ /dev/null @@ -1,68 +0,0 @@ -!extra-protocol-member! unexpected selector SCNSceneRenderer::context found -!missing-enum! SCNLightAreaType not bound -!missing-enum! SCNLightProbeType not bound -!missing-enum! SCNLightProbeUpdateType not bound -!missing-field! SCNHitTestOptionIgnoreLightArea not bound -!missing-field! SCNLightingModelShadowOnly not bound -!missing-field! SCNLightTypeArea not bound -!missing-protocol-member! SCNSceneRenderer::currentViewport not found -!missing-protocol-member! SCNSceneRenderer::isTemporalAntialiasingEnabled not found -!missing-protocol-member! SCNSceneRenderer::setTemporalAntialiasingEnabled: not found -!missing-protocol-member! SCNSceneRenderer::setUsesReverseZ: not found -!missing-protocol-member! SCNSceneRenderer::usesReverseZ not found -!missing-selector! SCNCamera::bloomIterationCount not bound -!missing-selector! SCNCamera::bloomIterationSpread not bound -!missing-selector! SCNCamera::grainIntensity not bound -!missing-selector! SCNCamera::grainIsColored not bound -!missing-selector! SCNCamera::grainScale not bound -!missing-selector! SCNCamera::projectionTransformWithViewportSize: not bound -!missing-selector! SCNCamera::setBloomIterationCount: not bound -!missing-selector! SCNCamera::setBloomIterationSpread: not bound -!missing-selector! SCNCamera::setGrainIntensity: not bound -!missing-selector! SCNCamera::setGrainIsColored: not bound -!missing-selector! SCNCamera::setGrainScale: not bound -!missing-selector! SCNCamera::setWhiteBalanceTemperature: not bound -!missing-selector! SCNCamera::setWhiteBalanceTint: not bound -!missing-selector! SCNCamera::whiteBalanceTemperature not bound -!missing-selector! SCNCamera::whiteBalanceTint not bound -!missing-selector! SCNHitTestResult::simdLocalCoordinates not bound -!missing-selector! SCNHitTestResult::simdLocalNormal not bound -!missing-selector! SCNHitTestResult::simdModelTransform not bound -!missing-selector! SCNHitTestResult::simdWorldCoordinates not bound -!missing-selector! SCNHitTestResult::simdWorldNormal not bound -!missing-selector! SCNLight::areaExtents not bound -!missing-selector! SCNLight::areaPolygonVertices not bound -!missing-selector! SCNLight::areaType not bound -!missing-selector! SCNLight::doubleSided not bound -!missing-selector! SCNLight::drawsArea not bound -!missing-selector! SCNLight::parallaxCenterOffset not bound -!missing-selector! SCNLight::parallaxCorrectionEnabled not bound -!missing-selector! SCNLight::parallaxExtentsFactor not bound -!missing-selector! SCNLight::probeEnvironment not bound -!missing-selector! SCNLight::probeExtents not bound -!missing-selector! SCNLight::probeOffset not bound -!missing-selector! SCNLight::probeType not bound -!missing-selector! SCNLight::probeUpdateType not bound -!missing-selector! SCNLight::setAreaExtents: not bound -!missing-selector! SCNLight::setAreaPolygonVertices: not bound -!missing-selector! SCNLight::setAreaType: not bound -!missing-selector! SCNLight::setDoubleSided: not bound -!missing-selector! SCNLight::setDrawsArea: not bound -!missing-selector! SCNLight::setParallaxCenterOffset: not bound -!missing-selector! SCNLight::setParallaxCorrectionEnabled: not bound -!missing-selector! SCNLight::setParallaxExtentsFactor: not bound -!missing-selector! SCNLight::setProbeExtents: not bound -!missing-selector! SCNLight::setProbeOffset: not bound -!missing-selector! SCNLight::setProbeType: not bound -!missing-selector! SCNLight::setProbeUpdateType: not bound -!missing-selector! SCNMaterial::clearCoat not bound -!missing-selector! SCNMaterial::clearCoatNormal not bound -!missing-selector! SCNMaterial::clearCoatRoughness not bound -!missing-selector! SCNScene::screenSpaceReflectionMaximumDistance not bound -!missing-selector! SCNScene::screenSpaceReflectionSampleCount not bound -!missing-selector! SCNScene::screenSpaceReflectionStride not bound -!missing-selector! SCNScene::setScreenSpaceReflectionMaximumDistance: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionSampleCount: not bound -!missing-selector! SCNScene::setScreenSpaceReflectionStride: not bound -!missing-selector! SCNScene::setWantsScreenSpaceReflection: not bound -!missing-selector! SCNScene::wantsScreenSpaceReflection not bound diff --git a/tools/install-source/Program.cs b/tools/install-source/Program.cs index f3a41ff90e..66b1d7ca52 100644 --- a/tools/install-source/Program.cs +++ b/tools/install-source/Program.cs @@ -207,7 +207,10 @@ public class ListSourceFiles { } if (verbose) Console.WriteLine ($"Original source is {src}"); - var fixedSource = mangler.GetSourcePath (src); + string fixedSource = src; + + if (!File.Exists (fixedSource)) + fixedSource = mangler.GetSourcePath (src); if (String.IsNullOrEmpty (fixedSource)) { Console.WriteLine ($"Skip path {src}"); diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index c405f4e428..fb0661e129 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -897,7 +897,7 @@ namespace Xamarin.Bundler { mono_dir = GetXamMacPrefix (); } else { var dir = new StringBuilder (); - RunCommand (pkg_config, "--variable=prefix mono-2", null, dir); + RunPkgConfig ("--variable=prefix mono-2", null, dir); mono_dir = Path.GetFullPath (dir.ToString ().Replace (Environment.NewLine, String.Empty)); } } @@ -1143,13 +1143,14 @@ namespace Xamarin.Bundler { if (!IsUnifiedFullSystemFramework) env = new [] { "PKG_CONFIG_PATH", Path.Combine (GetXamMacPrefix (), "lib", "pkgconfig") }; - RunCommand (pkg_config, "--cflags mono-2", env, cflagsb); - RunCommand (pkg_config, "--variable=libdir mono-2", env, libdirb); + RunPkgConfig ("--cflags mono-2", env, cflagsb); + RunPkgConfig ("--variable=libdir mono-2", env, libdirb); + var versionFile = "/Library/Frameworks/Mono.framework/Versions/Current/VERSION"; if (File.Exists (versionFile)) { mono_version.Append (File.ReadAllText (versionFile)); } else { - RunCommand (pkg_config, "--modversion mono-2", env, mono_version); + RunPkgConfig ("--modversion mono-2", env, mono_version); } } catch (Win32Exception e) { throw new MonoMacException (5301, true, e, "pkg-config could not be found. Please install the Mono.framework from http://mono-project.com/Downloads"); @@ -1360,6 +1361,14 @@ namespace Xamarin.Bundler { return ret; } + static void RunPkgConfig (string args, string [] env = null, StringBuilder output = null, bool suppressPrintOnErrors = false) + { + var rv = RunCommand (pkg_config, args, env, output, suppressPrintOnErrors); + if (rv != 0) + throw ErrorHelper.CreateError (5312, $"pkg-config failed with an error code '{rv}'. Check build log for details."); + + } + static int XcodeRun (string command, string args, StringBuilder output = null) { string [] env = DeveloperDirectory != string.Empty ? new string [] { "DEVELOPER_DIR", DeveloperDirectory } : null;