Skip to content

MetalFX macOS xcode14.0 beta5

Alex Soto edited this page Aug 8, 2022 · 1 revision

#MetalFX.framework

diff -ruN /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h
--- /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h	2022-07-22 10:06:38.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXSpatialScaler.h	2022-08-05 13:41:43.000000000 -0400
@@ -7,11 +7,11 @@
 
 #import <Metal/Metal.h>
 
-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. */
-    MTLFXSpatialScalerColorProcessingMode_HDR = 2,        /* This should be used when the input and output texture will contain light linear data outside the 0-1 range.  In
-                                                             this case a reversible tonemapping operation will be done internally to convert to a 0-1 range. */
+typedef NS_ENUM(NSInteger, MTLFXSpatialScalerColorProcessingMode) {
+    MTLFXSpatialScalerColorProcessingModePerceptual NS_SWIFT_NAME(perceptual) = 0, /* This should be used when the input and output textures are already in an sRGB or otherwise perceptual 0-1 encoding. */
+    MTLFXSpatialScalerColorProcessingModeLinear NS_SWIFT_NAME(linear) = 1,         /* This should be used when the input and output textures will contain light linear data in the 0-1 range. */
+    MTLFXSpatialScalerColorProcessingModeHDR NS_SWIFT_NAME(hdr) = 2,               /* This should be used when the input and output texture will contain light linear data outside the 0-1 range.
+                                                                                      In this case a reversible tonemapping operation will be done internally to convert to a 0-1 range. */
 } API_AVAILABLE(macos(13.0), ios(16.0));
 
 // Forward declaration.
@@ -56,6 +56,7 @@
 // frame basis.   We don't care about the textures assigned except that they must
 // match the required MTLTextureUsage flags.
 @property (nonatomic, retain, nullable) id<MTLTexture> colorTexture;
+// outputTexture is required to have MTLStorageModePrivate for storageMode
 @property (nonatomic, retain, nullable) id<MTLTexture> outputTexture;
 
 // Read-only immutable properties of effect
diff -ruN /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h
--- /Applications/Xcode_14.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h	2022-07-22 10:06:38.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/MetalFX.framework/Headers/MTLFXTemporalScaler.h	2022-08-05 13:41:43.000000000 -0400
@@ -6,8 +6,6 @@
 //
 
 #import <Metal/Metal.h>
-#import <simd/simd.h>
-#import <CoreGraphics/CoreGraphics.h>
 
 // Forward declaration.
 @protocol MTLFXTemporalScaler;
@@ -63,12 +61,13 @@
 @property (nonatomic) NSUInteger inputContentWidth;
 @property (nonatomic) NSUInteger inputContentHeight;
 
-// 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
+// These can 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, nullable) id<MTLTexture> colorTexture;
 @property (nonatomic, retain, nullable) id<MTLTexture> depthTexture;
 @property (nonatomic, retain, nullable) id<MTLTexture> motionTexture;
+// outputTexture is required to have MTLStorageModePrivate for storageMode
 @property (nonatomic, retain, nullable) id<MTLTexture> outputTexture;
 
 // Exposure properties
@@ -82,7 +81,8 @@
 
 // The jitter offset property indicates the pixel offset to sample in order to
 // return to the frame's reference frame.
-@property (nonatomic) CGPoint jitterOffset;
+@property (nonatomic) float jitterOffsetX;
+@property (nonatomic) float jitterOffsetY;
 
 // Scale factor to be applied to motion vectors to convert to pixel/fragment
 // coordinates in the input data.  The expectation for a 1.0 scale factor is
@@ -90,13 +90,14 @@
 // prior frame.  Assuming standard Metal device coordinates (0,0 is upper left
 // in the framebuffer), the motion vectors for an object that moved down and
 // to the right in the framebuffer texture by 10 pixels would be -10,-10.
-@property (nonatomic) CGPoint motionVectorScale;
+@property (nonatomic) float motionVectorScaleX;
+@property (nonatomic) float motionVectorScaleY;
 
 // Reset.  Set to true when history is invalid (scene cut, etc.)
 @property (nonatomic) BOOL reset;
 
 // Set whether the depth buffer uses reversed depth or not. Defaults to YES.
-@property (nonatomic) BOOL reversedDepth;
+@property (readwrite, nonatomic, getter=isDepthReversed) BOOL depthReversed;
 
 // Read-only immutable properties of effect
 @property (nonatomic, readonly) MTLPixelFormat colorTextureFormat;
Clone this wiki locally