-
Notifications
You must be signed in to change notification settings - Fork 547
Metal tvOS xcode26.0 b2
Rolf Bjarne Kvinge edited this page Jul 18, 2025
·
2 revisions
#Metal.framework https://github.com/dotnet/macios/pull/23355
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h 2025-05-28 02:49:13
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h 2025-06-16 00:56:33
@@ -16,11 +16,6 @@
NS_ASSUME_NONNULL_BEGIN
-/// Represents reflection information for a binary function.
-MTL_EXPORT
-API_AVAILABLE(macos(26.0), ios(26.0))
-@interface MTL4BinaryFunctionReflection : NSObject
-@end
/// Represents a binary function.
///
@@ -31,8 +26,6 @@
/// Obtains the optional name of this binary function.
@property (nullable, readonly) NSString* name;
-/// Obtains reflection information for this binary function.
-@property (nullable, readonly) MTL4BinaryFunctionReflection* reflection;
/// Describes the type of this binary function.
@property (readonly) MTLFunctionType functionType;
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h 1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h 2025-06-16 00:56:28
@@ -0,0 +1,76 @@
+//
+// MTL4BufferRange.h
+// Metal
+//
+// Copyright (c) 2025 Apple Inc. All rights reserved.
+//
+
+#ifdef __METAL_VERSION__
+
+#import <metal_stdlib>
+
+#else
+
+#include <stdint.h>
+
+#ifndef _WIN32
+#import <Metal/MTLDefines.h>
+#else
+#include <Metal/MTLDefines.h>
+#endif // _WIN32
+
+#endif
+
+/**
+ * @brief A struct representing a range of a Metal buffer. The offset into the buffer is included in the address.
+ * The length is generally optional, which a value of (uint64_t)-1 representing the range from the given address to
+ * the end of the buffer. However, providing the length can enable more accurate API validation, especially when
+ * sub-allocating ranges of a buffer.
+ */
+typedef struct MTL4BufferRange {
+ /**
+ * @brief Buffer address returned by the gpuAddress property of an MTLBuffer plus any offset into the buffer
+ */
+ uint64_t bufferAddress;
+
+ /**
+ * @brief Length of the region which begins at the given address. If the length is not known, a value of
+ * (uint64_t)-1 represents the range from the given address to the end of the buffer.
+ */
+ uint64_t length;
+
+#ifdef __cplusplus
+ MTL4BufferRange()
+ : bufferAddress(0),
+ length(0)
+ {
+ }
+
+ MTL4BufferRange(uint64_t bufferAddress)
+ : bufferAddress(bufferAddress),
+ length((uint64_t)-1)
+ {
+ }
+
+ MTL4BufferRange(uint64_t bufferAddress, uint64_t length)
+ : bufferAddress(bufferAddress),
+ length(length)
+ {
+ }
+#endif
+} MTL4BufferRange;
+
+#ifndef __METAL_VERSION__
+/**
+ * @brief Create a buffer range from a buffer's GPU address (given by the gpuAddress property) and length. A length of
+ * (uint64_t)-1 represents the the range from the given address to the end of the buffer.
+ */
+MTL_INLINE MTL4BufferRange MTL4BufferRangeMake(uint64_t bufferAddress, uint64_t length) {
+ MTL4BufferRange range;
+
+ range.bufferAddress = bufferAddress;
+ range.length = length;
+
+ return range;
+}
+#endif
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h 2025-05-28 02:54:17
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h 2025-06-16 00:56:30
@@ -11,6 +11,7 @@
#import <Metal/MTLDefines.h>
#import <Metal/MTLCommandBuffer.h>
#import <Metal/MTL4RenderCommandEncoder.h>
+#import <Metal/MTL4BufferRange.h>
NS_ASSUME_NONNULL_BEGIN
@@ -172,10 +173,11 @@
atIndex:(NSUInteger) index
API_AVAILABLE(macos(26.0), ios(26.0));
+
/// Encodes a command that resolves an opaque counter heap into a buffer.
///
/// The command this method encodes converts the data within `counterHeap` into a common format
-/// and stores it into the `buffer` parameter.
+/// and stores it into the `bufferRange` parameter.
///
/// The command places each entry in the counter heap within `range` sequentially, starting at `alignedOffset`.
/// Each entry needs to be a fixed size that you can query by calling the
@@ -187,10 +189,10 @@
/// - Note: Your app needs ensure the GPU places data in the heap before you resolve it by
/// synchronizing this stage with other GPU operations.
///
-/// Similarly, your app needs to synchronize any GPU accesses to `buffer` after
+/// Similarly, your app needs to synchronize any GPU accesses to `bufferRange` after
/// the command completes with barrier.
///
-/// If your app needs to access `buffer` from the CPU, signal an ``MTLSharedEvent``
+/// If your app needs to access `bufferRange` from the CPU, signal an ``MTLSharedEvent``
/// to notify the CPU when it's ready.
/// Alternatively, you can resolve the heap's data from the CPU by calling
/// the heap's ``MTL4CounterHeap/resolveCounterRange:`` method.
@@ -198,14 +200,12 @@
/// - Parameters:
/// - counterHeap: A heap the command resolves.
/// - range: A range of index values within the heap the command resolves.
-/// - buffer: A buffer the command saves the data it resolves into.
-/// - alignedOffset: An offset within `buffer` that indicates where the command begins writing the data.
+/// - bufferRange: The buffer the command saves the data it resolves into.
/// - fenceToWait: A fence the GPU waits for before starting, if applicable; otherwise `nil`.
/// - fenceToUpdate: A fence the system updates after the command finishes resolving the data; otherwise `nil`.
- (void)resolveCounterHeap:(id<MTL4CounterHeap>)counterHeap
withRange:(NSRange)range
- intoBuffer:(id<MTLBuffer>)buffer
- atOffset:(NSUInteger)alignedOffset
+ intoBuffer:(MTL4BufferRange)bufferRange
waitFence:(nullable id<MTLFence>)fenceToWait
updateFence:(nullable id<MTLFence>)fenceToUpdate
API_AVAILABLE(macos(26.0), ios(26.0));
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h 2025-05-28 02:01:31
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h 2025-06-16 00:56:32
@@ -118,7 +118,7 @@
/// The starting offset in the heap, in tiles.
NSUInteger heapOffset;
-} MTL4UpdateSparseTextureMappingOperation;
+} MTL4UpdateSparseTextureMappingOperation API_AVAILABLE(macos(26.0), ios(26.0));
/// Groups together arguments for an operation to copy a sparse texture mapping.
typedef struct
@@ -150,7 +150,7 @@
/// Provide `0` in this member if the texture type is not an array.
NSUInteger destinationSlice;
-} MTL4CopySparseTextureMappingOperation;
+} MTL4CopySparseTextureMappingOperation API_AVAILABLE(macos(26.0), ios(26.0));
/// Groups together arguments for an operation to update a sparse buffer mapping.
typedef struct
@@ -171,7 +171,7 @@
/// The starting offset in the heap, in tiles.
NSUInteger heapOffset;
-} MTL4UpdateSparseBufferMappingOperation;
+} MTL4UpdateSparseBufferMappingOperation API_AVAILABLE(macos(26.0), ios(26.0));
/// Groups together arguments for an operation to copy a sparse buffer mapping.
typedef struct
@@ -183,7 +183,7 @@
/// The origin in the destination buffer, in tiles.
NSUInteger destinationOffset;
-} MTL4CopySparseBufferMappingOperation;
+} MTL4CopySparseBufferMappingOperation API_AVAILABLE(macos(26.0), ios(26.0));
/// An abstraction representing a command queue that you use commit and synchronize command buffers and to
/// perform other GPU operations.
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h 2025-05-28 02:49:13
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h 2025-06-16 00:56:33
@@ -12,6 +12,8 @@
#import <Metal/MTLDefines.h>
+NS_ASSUME_NONNULL_BEGIN
+
@protocol MTL4CommitFeedback;
/// Defines the block signature for a callback Metal invokes to provide your app feedback after completing a workload.
@@ -22,14 +24,14 @@
/// method.
///
/// - Parameter commitFeedback: a commit feedback instance containing information about the workload.
-typedef void (^ NS_SWIFT_SENDABLE MTL4CommitFeedbackHandler)(id<MTL4CommitFeedback> commitFeedback);
+typedef void (^ NS_SWIFT_SENDABLE MTL4CommitFeedbackHandler)(id<MTL4CommitFeedback> commitFeedback) API_AVAILABLE(macos(26.0), ios(26.0));
/// Describes an object containing debug information from Metal to your app after completing a workload.
API_AVAILABLE(macos(26.0), ios(26.0))
@protocol MTL4CommitFeedback <NSObject>
/// A description of an error when the GPU encounters an issue as it runs the committed command buffers.
-@property (readonly, nonatomic) NSError *error;
+@property (readonly, nonatomic, nullable) NSError *error;
/// The host time, in seconds, when the GPU starts execution of the committed command buffers.
@property (readonly, nonatomic) CFTimeInterval GPUStartTime;
@@ -38,6 +40,8 @@
@property (readonly, nonatomic) CFTimeInterval GPUEndTime;
@end
+
+NS_ASSUME_NONNULL_END
#endif // MTL4CommitFeedback_h
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h 2025-05-28 02:49:11
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h 2025-06-16 02:25:13
@@ -366,8 +366,6 @@
- (id<MTL4CompilerTask>)newMachineLearningPipelineStateWithDescriptor:(MTL4MachineLearningPipelineDescriptor *)descriptor
completionHandler:(MTL4NewMachineLearningPipelineStateCompletionHandler)completionHandler;
-/// Cancels all pending compiler tasks for this compiler.
-- (void)cancel;
@end
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h 2025-05-28 02:49:10
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h 2025-06-16 00:56:29
@@ -18,42 +18,49 @@
@protocol MTL4BinaryFunction;
@protocol MTLDynamicLibrary;
@class MTL4FunctionDescriptor;
-@class MTL4LinkedFunctions;
@class MTLComputePipelineReflection;
@class MTL4StaticLinkingDescriptor;
-/// Descriptor defining how a compute pipeline state would be created.
+/// Describes a compute pipeline state.
MTL_EXPORT
API_AVAILABLE(macos(26.0), ios(26.0))
@interface MTL4ComputePipelineDescriptor : MTL4PipelineDescriptor
-/// A function descriptor representing the function that will be executed by the compute pipeline.
+/// A descriptor representing the compute pipeline's function.
+///
+/// You don't assign instances of ``MTL4FunctionDescriptor`` to this property directly, instead
+/// assign an instance of one of its subclasses, such as ``MTL4LibraryFunctionDescriptor``, which
+/// represents a function from a Metal library.
@property (nullable, readwrite, nonatomic, copy) MTL4FunctionDescriptor* computeFunctionDescriptor;
/// A boolean value indicating whether each dimension of the threadgroup size is a multiple of its
/// corresponding thread execution width.
@property (readwrite, nonatomic) BOOL threadGroupSizeIsMultipleOfThreadExecutionWidth;
-/// The maximum total number of threads that can be executing in a single threadgroup for the
+/// The maximum total number of threads that Metal can execute in a single threadgroup for the
/// compute function.
@property (readwrite, nonatomic) NSUInteger maxTotalThreadsPerThreadgroup;
-/// Sets the required threads-per-threadgroup during dispatches. The `threadsPerThreadgroup` argument of any dispatch must match this value if it is set.
-/// Optional, unless the pipeline is going to use CooperativeTensors in which case this must be set.
-/// Setting this to a size of 0 in every dimension disables this property
+/// The required number of threads per threadgroup for compute dispatches.
+///
+/// When you set this value, you are responsible for ensuring that the `threadsPerThreadgroup` argument of any compute
+/// dispatch matches it.
+///
+/// Setting this property is optional, except in cases where the pipeline uses *CooperativeTensors*.
+///
+/// This property's default value is `0`, which disables its effect.
@property(readwrite, nonatomic) MTLSize requiredThreadsPerThreadgroup;
-/// A boolean value indicating whether the compute pipeline should support adding binary functions.
+/// A boolean value indicating whether the compute pipeline supports linking binary functions.
@property (readwrite, nonatomic) BOOL supportBinaryLinking;
-/// An object that contains information about functions that are linked to the compute pipeline
-/// during creation.
+/// An object that contains information about functions to link to the compute pipeline.
@property (nullable, copy, nonatomic) MTL4StaticLinkingDescriptor* staticLinkingDescriptor;
-/// A value indicating whether the pipeline should support indirect command buffers.
+/// A value indicating whether the pipeline supports Metal indirect command buffers.
@property (readwrite, nonatomic) MTL4IndirectCommandBufferSupportState supportIndirectCommandBuffers;
-/// Resets the descriptor to the default values.
+/// Resets the descriptor to its default values.
- (void)reset;
@end
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h 2025-05-28 02:54:17
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h 2025-06-16 00:56:30
@@ -59,7 +59,7 @@
/// Assigns the number of entries in the heap.
///
/// Each entry represents one item in the heap. The size of the individual entries depends on the heap type.
-@property (nonatomic) NSUInteger entryCount;
+@property (nonatomic) NSUInteger count;
@end
@@ -82,7 +82,7 @@
///
/// This method resolves heap data in the CPU timeline. Your app needs to ensure the GPU work has completed in order to
/// retrieve the data correctly. You can alternatively resolve the heap data in the GPU timeline by calling
-/// ``MTL4CommandBuffer/resolveCounterHeap:withRange:intoBuffer:atOffset:waitFence:updateFence:``.
+/// ``MTL4CommandBuffer/resolveCounterHeap:withRange:intoBuffer:waitFence:updateFence:``.
///
/// - Note: When resolving counters in the CPU timeline, signaling an instance of ``MTLSharedEvent`` after any workloads
/// write counters (and waiting on that signal on the CPU) is sufficient to ensure synchronization.
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkedFunctions.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkedFunctions.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkedFunctions.h 2025-05-28 02:49:12
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkedFunctions.h 1969-12-31 19:00:00
@@ -1,47 +0,0 @@
-//
-// MTL4LinkedFunctions.h
-// Metal
-//
-// Copyright © 2024 Apple, Inc. All rights reserved.
-//
-
-#ifndef MTL4LinkedFunctions_h
-#define MTL4LinkedFunctions_h
-
-#import <Metal/MTLDefines.h>
-
-#import <Metal/MTL4BinaryFunction.h>
-#import <Metal/MTL4FunctionDescriptor.h>
-#import <Metal/MTLTypes.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Groups together functions to link.
-MTL_EXPORT
-API_AVAILABLE(macos(26.0), ios(26.0))
-@interface MTL4LinkedFunctions : NSObject<NSCopying>
-
-/// Provides an array of functions to link at the Metal IR level.
-@property (readwrite, nonatomic, copy, nullable) NSArray<MTL4FunctionDescriptor*>* functionDescriptors;
-
-/// Provides an array of binary functions to link.
-@property (readwrite, nonatomic, copy, nullable) NSArray<id<MTL4BinaryFunction>>* binaryFunctions;
-
-/// Provides an array of private functions to link at the Metal IR level.
-///
-///
-/// You specify private functions to link separately from ``functionDescriptors`` because pipelines don't export private
-/// functions as ``MTLFunctionHandle`` instances.
-/// - Note: You can link private functions even when your ``MTLDevice`` doesn't support function pointers.
-@property (readwrite, nonatomic, copy, nullable) NSArray<MTL4FunctionDescriptor*>* privateFunctionDescriptors;
-
-/// Assigns groups of functions to match call-site attributes in shader code.
-///
-/// Function groups help the compiler reduce the number of candidate functions it needs to evaluate for shader function
-/// calls, potentially increasing runtime performance.
-@property (readwrite, nonatomic, copy, nullable) NSDictionary<NSString*, NSArray<MTL4FunctionDescriptor*>*>* groups;
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // MTL4LinkedFunctions_h
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h 2025-05-28 02:49:12
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h 2025-06-16 00:56:32
@@ -19,7 +19,7 @@
@protocol MTL4ArgumentTable;
@protocol MTL4MachineLearningPipelineState;
-/// Encodes commands for dispatching machine learning networks on the GPU.
+/// Encodes commands for dispatching machine learning networks on Apple silicon.
API_AVAILABLE(macos(26.0), ios(26.0))
@protocol MTL4MachineLearningCommandEncoder <MTL4CommandEncoder>
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h 2025-05-28 02:54:17
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h 2025-06-16 00:56:30
@@ -19,21 +19,19 @@
///
/// You can combine these values via a logical `OR` and set it to ``MTL4PipelineDataSetSerializerDescriptor/configuration``
/// to specify desired level of serialization support for instances of ``MTL4PipelineDataSetSerializer``.
-API_AVAILABLE(macos(26.0), ios(26.0))
typedef NS_OPTIONS(NSInteger, MTL4PipelineDataSetSerializerConfiguration) {
/// Enables serializing pipeline scripts.
///
/// Set this mask to use ``MTL4PipelineDataSetSerializer.serializeAsPipelinesScriptWithError``.
///
/// This for the default behavior.
- MTL4PipelineDataSetSerializerConfigurationCaptureDescriptors = 0,
+ MTL4PipelineDataSetSerializerConfigurationCaptureDescriptors = (1 << 0),
/// Enables serializing pipeline binary functions.
///
/// Set this mask to use ``MTL4PipelineDataSetSerializer.serializeAsArchiveAndFlush(toURL:error:)``.
- MTL4PipelineDataSetSerializerConfigurationCaptureBinaries = 1,
-
-};
+ MTL4PipelineDataSetSerializerConfigurationCaptureBinaries = (1 << 1),
+} API_AVAILABLE(macos(26.0), ios(26.0));
/// Groups together properties to create a pipeline data set serializer.
MTL_EXPORT
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h 2025-05-28 02:49:12
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h 2025-06-16 00:56:32
@@ -76,9 +76,6 @@
MTL4IndirectCommandBufferSupportStateEnabled = 1,
} API_AVAILABLE(macos(26.0), ios(26.0));
-/// Constant to specify discarding a color attachment's index in a remap operation.
-MTL_EXTERN const NSUInteger MTLRenderTargetRemapIndexDiscard;
-
/// Provides options controlling how to compile a pipeline state.
///
/// You provide these options through the ``MTL4PipelineDescriptor`` class at compilation time.
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2025-05-28 04:53:30
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2025-06-16 00:56:32
@@ -70,7 +70,7 @@
/// <doc://com.apple.documentation/documentation/swift/true>.
///
/// - Parameter mapping: Mapping from logical shader outputs to physical outputs.
-- (void)setColorAttachmentMap:(MTLLogicalToPhysicalColorAttachmentMap *)mapping;
+- (void)setColorAttachmentMap:(nullable MTLLogicalToPhysicalColorAttachmentMap *)mapping;
/// Configures this encoder with a render pipeline state that applies to your subsequent draw commands.
///
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h 2025-05-28 02:01:30
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h 2025-06-16 00:56:30
@@ -19,7 +19,6 @@
NS_ASSUME_NONNULL_BEGIN
@class MTL4FunctionDescriptor;
-@class MTL4LinkedFunctions;
@protocol MTL4BinaryFunction;
@class MTL4StaticLinkingDescriptor;
@@ -119,23 +118,6 @@
- (void)reset;
@end
-/// Allows you to easily specify color attachment remapping from logical to physical indices.
-MTL_EXPORT
-API_AVAILABLE(macos(26.0), ios(26.0))
-@interface MTLLogicalToPhysicalColorAttachmentMap : NSObject<NSCopying>
-
-/// Maps a physical color attachment index to a logical index.
-///
-/// - Parameters:
-/// - physicalIndex: index of the color attachment's physical mapping.
-/// - logicalIndex: index of the color attachment's logical mapping.
-- (void)setPhysicalIndex:(NSUInteger)physicalIndex forLogicalIndex:(NSUInteger)logicalIndex;
-
-/// Queries the physical color attachment index corresponding to a logical index.
-- (NSUInteger)getPhysicalIndexForLogicalIndex:(NSUInteger)logicalIndex;
-
-- (void)reset;
-@end
@protocol MTL4BinaryFunction;
@class MTLVertexDescriptor;
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h 2025-05-28 04:53:26
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h 2025-06-16 02:47:25
@@ -6,8 +6,15 @@
#else
#include <math.h>
#include <stdint.h>
+
+#ifndef _WIN32
#import <Metal/MTLDefines.h>
+#else
+#include <Metal/MTLDefines.h>
+#endif // _WIN32
+#include <Metal/MTL4BufferRange.h>
+
typedef struct _MTLPackedFloat3 {
union {
struct {
@@ -215,57 +222,3 @@
*/
MTLPackedFloat3 translation;
} MTLComponentTransform;
-
-/**
- * @brief A struct representing a range of a Metal buffer. The offset into the buffer is included in the address.
- * The length is generally optional, which a value of (uint64_t)-1 representing the range from the given address to
- * the end of the buffer. However, providing the length can enable more accurate API validation, especially when
- * sub-allocating ranges of a buffer.
- */
-typedef struct MTL4BufferRange {
- /**
- * @brief Buffer address returned by the gpuAddress property of an MTLBuffer plus any offset into the buffer
- */
- uint64_t bufferAddress;
-
- /**
- * @brief Length of the region which begins at the given address. If the length is not known, a value of
- * (uint64_t)-1 represents the range from the given address to the end of the buffer.
- */
- uint64_t length;
-
-#ifdef __cplusplus
- MTL4BufferRange()
- : bufferAddress(0),
- length(0)
- {
- }
-
- MTL4BufferRange(uint64_t bufferAddress)
- : bufferAddress(bufferAddress),
- length((uint64_t)-1)
- {
- }
-
- MTL4BufferRange(uint64_t bufferAddress, uint64_t length)
- : bufferAddress(bufferAddress),
- length(length)
- {
- }
-#endif
-} MTL4BufferRange;
-
-#ifndef __METAL_VERSION__
-/**
- * @brief Create a buffer range from a buffer's GPU address (given by the gpuAddress property) and length. A length of
- * (uint64_t)-1 represents the the range from the given address to the end of the buffer.
- */
-MTL_INLINE MTL4BufferRange MTL4BufferRangeMake(uint64_t bufferAddress, uint64_t length) {
- MTL4BufferRange range;
-
- range.bufferAddress = bufferAddress;
- range.length = length;
-
- return range;
-}
-#endif
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2025-05-28 02:49:10
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2025-06-16 02:25:11
@@ -1370,7 +1370,7 @@
/// your app resolves it into a usable format.
///
/// In order to use the data available in a ``MTL4CounterHeap``, your app first resolves it either in the CPU timeline
-/// or in the GPU timeline. When your app calls ``MTL4CommandBuffer/resolveCounterHeap:withRange:intoBuffer:atOffset:waitFence:updateFence:``
+/// or in the GPU timeline. When your app calls ``MTL4CommandBuffer/resolveCounterHeap:withRange:intoBuffer:waitFence:updateFence:``
/// to resolve counter data in the GPU timeline, Metal writes the data into a ``MTLBuffer``.
///
/// During this process, Metal transform the data in the heap into a format consisting of entries of the size
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h 2025-05-28 02:49:11
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h 2025-06-16 02:25:12
@@ -25,6 +25,8 @@
@protocol MTLTexture;
@protocol MTLRenderPipelineState;
+@class MTLLogicalToPhysicalColorAttachmentMap;
+
typedef NS_ENUM(NSUInteger, MTLPrimitiveType) {
MTLPrimitiveTypePoint = 0,
MTLPrimitiveTypeLine = 1,
@@ -1049,5 +1051,21 @@
-(void)sampleCountersInBuffer:(id<MTLCounterSampleBuffer>)sampleBuffer
atSampleIndex:(NSUInteger)sampleIndex
withBarrier:(BOOL)barrier API_AVAILABLE(macos(10.15), ios(14.0));
+
+
+/// Sets the mapping from logical shader color output to physical render pass color attachments.
+///
+/// Use this method to define how the physical color attachments you specify via ``MTLRenderPassDescriptor/colorAttachments``
+/// map to the logical color output the fragment shader writes to.
+///
+/// To use this feature, make sure to set ``MTLRenderPassDescriptor/supportColorAttachmentMapping`` to
+/// <doc://com.apple.documentation/documentation/swift/true>.
+///
+/// - Parameter mapping: Mapping from logical shader outputs to physical outputs.
+- (void)setColorAttachmentMap:(nullable MTLLogicalToPhysicalColorAttachmentMap *)mapping
+API_AVAILABLE(macos(26.0), ios(26.0));
+
+
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h 2025-05-28 02:49:12
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h 2025-06-16 00:56:32
@@ -404,6 +404,9 @@
/// Specifies if Metal accumulates visibility results between render encoders or resets them.
@property (nonatomic) MTLVisibilityResultType visibilityResultType API_AVAILABLE(macos(26.0), ios(26.0));
+/// Specifies if the render pass should support color attachment mapping.
+@property (nonatomic) BOOL supportColorAttachmentMapping API_AVAILABLE(macos(26.0), ios(26.0));
+
@end
// Inline definitions
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2025-05-28 02:49:11
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2025-06-16 02:25:12
@@ -144,6 +144,25 @@
@end
+/// Allows you to easily specify color attachment remapping from logical to physical indices.
+MTL_EXPORT
+API_AVAILABLE(macos(26.0), ios(26.0))
+@interface MTLLogicalToPhysicalColorAttachmentMap : NSObject<NSCopying>
+
+/// Maps a physical color attachment index to a logical index.
+///
+/// - Parameters:
+/// - physicalIndex: index of the color attachment's physical mapping.
+/// - logicalIndex: index of the color attachment's logical mapping.
+- (void)setPhysicalIndex:(NSUInteger)physicalIndex forLogicalIndex:(NSUInteger)logicalIndex;
+
+/// Queries the physical color attachment index corresponding to a logical index.
+- (NSUInteger)getPhysicalIndexForLogicalIndex:(NSUInteger)logicalIndex;
+
+- (void)reset;
+@end
+
+
MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0)) NS_SWIFT_SENDABLE
@interface MTLRenderPipelineReflection : NSObject
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2025-05-20 20:28:57
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2025-06-12 17:46:37
@@ -2074,6 +2074,15 @@
SwiftName: dispatchNetwork(intermediatesHeap:)
MethodKind: Instance
+- Name: MTL4CounterHeap
+ Methods:
+ - Selector: 'resolveCounterRange:'
+ MethodKind: Instance
+ SwiftPrivate: true
+ - Selector: 'invalidateCounterRange:'
+ MethodKind: Instance
+ SwiftPrivate: true
+
- Name: MTL4CommandBuffer
Methods:
- Selector: 'beginCommandBufferWithAllocator:'
@@ -2106,7 +2115,7 @@
- Selector: 'writeTimestampIntoHeap:atIndex:'
SwiftName: writeTimestamp(counterHeap:index:)
MethodKind: Instance
- - Selector: 'resolveCounterHeap:withRange:intoBuffer:atOffset:waitFence:updateFence:'
+ - Selector: 'resolveCounterHeap:withRange:intoBuffer:waitFence:updateFence:'
SwiftPrivate: true
MethodKind: Instance
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h 2025-05-28 02:49:09
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h 2025-06-16 00:56:28
@@ -76,7 +76,6 @@
#import <Metal/MTL4CompilerTask.h>
#import <Metal/MTL4LibraryDescriptor.h>
#import <Metal/MTL4FunctionDescriptor.h>
-#import <Metal/MTL4LinkedFunctions.h>
#import <Metal/MTL4LibraryFunctionDescriptor.h>
#import <Metal/MTL4SpecializedFunctionDescriptor.h>
#import <Metal/MTL4StitchedFunctionDescriptor.h>
@@ -91,3 +90,4 @@
#import <Metal/MTL4CommitFeedback.h>
#import <Metal/MTL4BinaryFunctionDescriptor.h>
#import <Metal/MTL4LinkingDescriptor.h>
+#import <Metal/MTL4BufferRange.h>