-
Notifications
You must be signed in to change notification settings - Fork 517
MetalFX iOS xcode14.0 beta4
Alex Soto edited this page Jul 27, 2022
·
1 revision
#MetalFX.framework
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h 2022-06-30 22:11:21.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h 2022-07-25 15:37:42.000000000 -0400
@@ -7,11 +7,6 @@
#import <Metal/Metal.h>
-typedef NS_ENUM(NSUInteger, MTLFXSpatialScalerVersion) {
- MTLFXSpatialScalerVersion_v1 = 0,
- MTLFXSpatialScalerVersion_End,
-} API_AVAILABLE(macos(13.0), ios(16.0));
-
typedef NS_ENUM(NSUInteger, MTLFXSpatialScalerColorProcessingMode) {
MTLFXSpatialScalerColorProcessingMode_Perceptual = 0, /* This should be used when the input and output textures are already in an sRGB or otherwise perceptual 0-1 encoding. */
MTLFXSpatialScalerColorProcessingMode_Linear = 1, /* This should be used when the input and output textures will contain light linear data in the 0-1 range. */
@@ -26,21 +21,22 @@
@interface MTLFXSpatialScalerDescriptor : NSObject
// These properties must be set to the respective Metal pixel formats for each texture that will be used with the scaler.
-@property MTLPixelFormat colorTextureFormat;
-@property MTLPixelFormat outputTextureFormat;
-@property NSUInteger inputWidth;
-@property NSUInteger inputHeight;
-@property NSUInteger outputWidth;
-@property NSUInteger outputHeight;
+@property (readwrite, nonatomic) MTLPixelFormat colorTextureFormat;
+@property (readwrite, nonatomic) MTLPixelFormat outputTextureFormat;
+@property (readwrite, nonatomic) NSUInteger inputWidth;
+@property (readwrite, nonatomic) NSUInteger inputHeight;
+@property (readwrite, nonatomic) NSUInteger outputWidth;
+@property (readwrite, nonatomic) NSUInteger outputHeight;
/* The default for colorProcessingMode is MTLFXSpatialScalerColorProcessingMode_Perceptual */
-@property (nonatomic) MTLFXSpatialScalerColorProcessingMode colorProcessingMode;
-
-@property enum MTLFXSpatialScalerVersion version;
+@property (readwrite, nonatomic) MTLFXSpatialScalerColorProcessingMode colorProcessingMode;
// The following method is used to instantiate the effect encoder for a given
// Metal device.
-- (id <MTLFXSpatialScaler>)newSpatialScalerWithDevice:(id<MTLDevice>)device;
+- (nullable id <MTLFXSpatialScaler>)newSpatialScalerWithDevice:(nonnull id<MTLDevice>)device;
+
+// Class method for determining support
++ (BOOL)supportsDevice:(nonnull id<MTLDevice>)device;
@end
@@ -59,8 +55,8 @@
// These would be all of the "state" needed that is allowed to change on a frame by
// frame basis. We don't care about the textures assigned except that they must
// match the required MTLTextureUsage flags.
-@property (nonatomic, retain) id<MTLTexture> colorTexture;
-@property (nonatomic, retain) id<MTLTexture> outputTexture;
+@property (nonatomic, retain, nullable) id<MTLTexture> colorTexture;
+@property (nonatomic, retain, nullable) id<MTLTexture> outputTexture;
// Read-only immutable properties of effect
@property (nonatomic, readonly) MTLPixelFormat colorTextureFormat;
@@ -72,10 +68,10 @@
@property (nonatomic, readonly) MTLFXSpatialScalerColorProcessingMode colorProcessingMode;
// Property for synchronization when using untracked resources
-@property (nonatomic, retain) id<MTLFence> fence;
+@property (nonatomic, retain, nullable) id<MTLFence> fence;
// Method to encode the effect to a command buffer
-- (void)encodeToCommandBuffer:(id<MTLCommandBuffer>)commandBuffer;
+- (void)encodeToCommandBuffer:(nonnull id<MTLCommandBuffer>)commandBuffer;
@end
diff -ruN /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h
--- /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h 2022-06-30 22:11:21.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h 2022-07-22 10:06:38.000000000 -0400
@@ -9,11 +9,6 @@
#import <simd/simd.h>
#import <CoreGraphics/CoreGraphics.h>
-typedef NS_ENUM(NSUInteger, MTLFXTemporalScalerVersion) {
- MTLFXTemporalScalerVersion_v1 = 0,
- MTLFXTemporalScalerVersion_End,
-} API_AVAILABLE(macos(13.0), ios(16.0));
-
// Forward declaration.
@protocol MTLFXTemporalScaler;
@@ -21,30 +16,36 @@
@interface MTLFXTemporalScalerDescriptor : NSObject
// These properties must be set to the respective Metal pixel formats for each texture that will be used with the scaler.
-@property MTLPixelFormat colorTextureFormat;
-@property MTLPixelFormat depthTextureFormat;
-@property MTLPixelFormat motionTextureFormat;
-@property MTLPixelFormat outputTextureFormat;
-
-@property NSUInteger inputWidth;
-@property NSUInteger inputHeight;
-@property NSUInteger outputWidth;
-@property NSUInteger outputHeight;
+@property (readwrite, nonatomic) MTLPixelFormat colorTextureFormat;
+@property (readwrite, nonatomic) MTLPixelFormat depthTextureFormat;
+@property (readwrite, nonatomic) MTLPixelFormat motionTextureFormat;
+@property (readwrite, nonatomic) MTLPixelFormat outputTextureFormat;
+
+@property (readwrite, nonatomic) NSUInteger inputWidth;
+@property (readwrite, nonatomic) NSUInteger inputHeight;
+@property (readwrite, nonatomic) NSUInteger outputWidth;
+@property (readwrite, nonatomic) NSUInteger outputHeight;
+
+// Auto exposure property, setting this to YES to indicate for MetalFX
+// to determine exposure per frame, which will ignore exposureTexture
+// property on the scaler object.
+@property (readwrite, nonatomic, getter=isAutoExposureEnabled) BOOL autoExposureEnabled;
// Dynamic Resolution properties
-// Set enableInputContentProperties to NO to indicate not using dynamic resolution
+// Set inputContentPropertiesEnabled to YES to indicate using dynamic resolution
// Scale value represents output resolution / input content resolution for either
// width or height dimension. It's assumed that aspect ratio of input/output is
// always the same.
-@property BOOL enableInputContentProperties;
-@property float inputContentMinScale;
-@property float inputContentMaxScale;
-
-@property enum MTLFXTemporalScalerVersion version;
+@property (readwrite, nonatomic, getter=isInputContentPropertiesEnabled) BOOL inputContentPropertiesEnabled;
+@property (readwrite, nonatomic) float inputContentMinScale;
+@property (readwrite, nonatomic) float inputContentMaxScale;
// The following method is used to instantiate the effect encoder for a given
// Metal device.
-- (id <MTLFXTemporalScaler>)newTemporalScalerWithDevice:(id<MTLDevice>)device;
+- (nullable id <MTLFXTemporalScaler>)newTemporalScalerWithDevice:(nonnull id<MTLDevice>)device;
+
+// Class method for determining support
++ (BOOL)supportsDevice:(nonnull id<MTLDevice>)device;
@end
@@ -65,10 +66,19 @@
// These would be all of the "state" needed that is allowed to change on a frame by
// frame basis. We don't care about the textures assigned except that they must
// match the originally specified dimensions and pixel formats.
-@property (nonatomic, retain) id<MTLTexture> colorTexture;
-@property (nonatomic, retain) id<MTLTexture> depthTexture;
-@property (nonatomic, retain) id<MTLTexture> motionTexture;
-@property (nonatomic, retain) id<MTLTexture> outputTexture;
+@property (nonatomic, retain, nullable) id<MTLTexture> colorTexture;
+@property (nonatomic, retain, nullable) id<MTLTexture> depthTexture;
+@property (nonatomic, retain, nullable) id<MTLTexture> motionTexture;
+@property (nonatomic, retain, nullable) id<MTLTexture> outputTexture;
+
+// Exposure properties
+// Ideally this is a 1x1 R16F texture. Note that only R channel of
+// the texel located at (0, 0) is used for exposure value. The value is used
+// to multiply the input color, use GPU to generate the exposure value.
+@property (nonatomic, retain, nullable) id<MTLTexture> exposureTexture;
+// If the input color is pre-multiplied by fixed value, set this value
+// which MetalFX will use to divide input color, this is not common.
+@property (nonatomic) float preExposure;
// The jitter offset property indicates the pixel offset to sample in order to
// return to the frame's reference frame.
@@ -101,9 +111,9 @@
@property (nonatomic, readonly) float inputContentMaxScale;
// Property for synchronization when using untracked resources
-@property (nonatomic, retain) id<MTLFence> fence;
+@property (nonatomic, retain, nullable) id<MTLFence> fence;
// Method to encode the effect to a command buffer
-- (void)encodeToCommandBuffer:(id<MTLCommandBuffer>)commandBuffer;
+- (void)encodeToCommandBuffer:(nonnull id<MTLCommandBuffer>)commandBuffer;
@end
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status