[MetalPerformanceShaders] Update bindings up to Xcode 27.0 Beta 3 - #26206
Conversation
Add the Xcode 27 MetalPerformanceShaders low-precision data types and Metal 4 NDArray encoding and reshape APIs across all supported Apple platforms. Add a safe managed wrapper and targeted tests for the dimension-array reshape overload, and remove the resolved xtro todo files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f43c3ca-a18a-496c-8276-c54876ecb4d7
There was a problem hiding this comment.
Pull request overview
Updates the MetalPerformanceShaders bindings to Xcode 27.0 Beta 3 by adding newly introduced low-precision MPSDataType enum values and new MPS NDArray reshape/encode APIs (including Metal 4 command-encoder entry points), alongside targeted tests and xtro todo cleanups.
Changes:
- Added Xcode 27 low-precision
MPSDataTypevalues (Float4E2M1,Float8E4M3,Float8E5M2,Float8E8M0). - Bound new MPS NDArray reshape APIs (CPU reshape + Metal 4 command encoder reshape/encode selectors), plus a managed
nuint[]overload for the dimension-pointer variant. - Added
MPSNDArrayIdentitytests and removed now-resolved xtro.todofiles for MetalPerformanceShaders.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-MetalPerformanceShaders.todo | Removed resolved xtro todo entries (file removed). |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-MetalPerformanceShaders.todo | Removed resolved xtro todo entries (file removed). |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MetalPerformanceShaders.todo | Removed resolved xtro todo entries (file removed). |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-MetalPerformanceShaders.todo | Removed resolved xtro todo entries (file removed). |
| tests/monotouch-test/MetalPerformanceShaders/MPSNDArrayIdentityTest.cs | Added targeted tests for new enum values and NDArray reshape APIs (including Metal 4 encoder path). |
| src/MetalPerformanceShaders/MPSNDArrayIdentity.cs | Added managed nuint[] overload for Metal 4 reshape that forwards to the pointer-based binding. |
| src/MetalPerformanceShaders/MPSEnums.cs | Added new Xcode 27 MPSDataType low-precision formats. |
| src/metalperformanceshaders.cs | Added new binding definitions for Metal 4 NDArray encode/reshape and CPU reshape selector. |
| public void ReshapeWithMtl4CommandEncoder (IMTL4ComputeCommandEncoder encoder, MPSNDArray sourceArray, nuint [] dimensionSizes, MPSNDArray destinationArray) | ||
| { | ||
| if (dimensionSizes is null) | ||
| ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (dimensionSizes)); | ||
|
|
||
| unsafe { | ||
| fixed (nuint* dimensionsPtr = dimensionSizes) { | ||
| _ReshapeWithMtl4CommandEncoder (encoder, sourceArray, (nuint) dimensionSizes.Length, (IntPtr) dimensionsPtr, destinationArray); | ||
| } | ||
| } | ||
| } |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-sim-pr-tests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
|
/azp run xamarin-macios-sim-pr-tests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Allow SupportedSimulator and UnsupportedSimulator attributes on binding methods and verify their per-platform emission with bgen tests. Annotate the MetalPerformanceShaders Metal 4 methods and managed reshape wrapper as unavailable on iOS and tvOS simulators. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f43c3ca-a18a-496c-8276-c54876ecb4d7
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot resolve the merge conflicts on this branch. |
Co-authored-by: dalexsoto <204671+dalexsoto@users.noreply.github.com>
Head branch was pushed to by a user without write access
Resolved on |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #57c4e9e] Prepare .NET Release succeeded ✅📦 Published NuGet packages (32 packages)iOS
MacCatalyst
macOS
tvOS
Other
Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #d11712b] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 3 tests failed, 192 tests passed. Failures❌ monotouch tests (iOS) [attempt 2]3 tests failed, 16 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Summary
MPSDataTypeformats.MPSNDArrayIdentitytests and remove the resolved xtro todo files.Validation
make worldCLLocationButton