Skip to content

CoreImage iOS xcode15.0 b1

Manuel de la Pena edited this page Aug 30, 2023 · 3 revisions

#CoreImage.framework https://github.com/xamarin/xamarin-macios/pull/18874

diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h	2023-03-09 23:50:20
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h	2023-06-01 00:05:10
@@ -20,7 +20,8 @@
 
 #if COREIMAGE_SUPPORTS_OPENGLES
  #import <OpenGLES/EAGL.h>
-#elif TARGET_OS_OSX
+#endif 
+#if TARGET_OS_OSX
  #import <OpenGL/CGLTypes.h>
 #endif 
 
@@ -201,6 +202,10 @@
 // The working pixel format of the CIContext used for intermediate buffers
 @property (nonatomic, readonly) CIFormat workingFormat NS_AVAILABLE(10_11,9_0);
 
+// A NSNumber that specifies the maximum memory footprint (in megabytes) that 
+// the CIContext allocates for render tasks.  Larger values could increase memory  
+// footprint while smaller values could reduce performance.
+CORE_IMAGE_EXPORT CIContextOption const kCIContextMemoryLimit NS_AVAILABLE(14_0, 17_0);
 
 #pragma mark - render methods
 
@@ -458,6 +463,12 @@
                                    colorSpace:(CGColorSpaceRef)colorSpace
                                       options:(NSDictionary<CIImageRepresentationOption, id>*)options NS_AVAILABLE(10_13,11_0);
 
+/* Render a CIImage to OpenEXR data. Image must have a finite non-empty extent. */
+/* No options keys are supported at this time. */
+- (nullable NSData*) OpenEXRRepresentationOfImage:(CIImage*)image
+                                          options:(NSDictionary<CIImageRepresentationOption, id>*)options
+                                            error:(NSError **)errorPtr NS_AVAILABLE(14_0, 17_0);
+
 /* Render a CIImage to TIFF file. Image must have a finite non-empty extent. */
 /* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
 /* and must match the specified CIFormat. */
@@ -512,6 +523,12 @@
                                   options:(NSDictionary<CIImageRepresentationOption, id>*)options
                                     error:(NSError **)errorPtr NS_AVAILABLE(12_0,15_0);
 
+/* Render a CIImage to OpenEXR file. Image must have a finite non-empty extent. */
+/* No options keys are supported at this time. */
+- (BOOL) writeOpenEXRRepresentationOfImage:(CIImage*)image
+                                     toURL:(NSURL*)url
+                                   options:(NSDictionary<CIImageRepresentationOption, id>*)options
+                                     error:(NSError **)errorPtr NS_AVAILABLE(14_0, 17_0);
 
 @end
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilter.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilter.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilter.h	2023-03-09 19:13:42
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilter.h	2023-05-31 08:52:21
@@ -337,14 +337,14 @@
  */
 + (nullable NSData*)serializedXMPFromFilters:(NSArray<CIFilter *> *)filters
                             inputImageExtent:(CGRect)extent
-    NS_AVAILABLE(10_9, 6_0);
+    NS_DEPRECATED(10_9,14_0, 6_0,17_0);
 
 /* Return an array of CIFilters de-serialized from XMP data.
  */
 + (NSArray<CIFilter *> *)filterArrayFromSerializedXMP:(NSData *)xmpData
                                      inputImageExtent:(CGRect)extent
                                                 error:(NSError **)outError
-    NS_AVAILABLE(10_9, 6_0);
+    NS_DEPRECATED(10_9,14_0, 6_0,17_0);
 
 @end
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilterBuiltins.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilterBuiltins.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilterBuiltins.h	2023-03-09 23:50:20
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilterBuiltins.h	2023-05-31 03:49:27
@@ -5,7 +5,7 @@
 
 #import <TargetConditionals.h>
 
-#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_TV
+#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
 
 #import <CoreImage/CIFilter.h>
 @class CIVector;
@@ -713,6 +713,12 @@
   @property (nonatomic) float radius;
   @property (nonatomic, retain) CIColor *color;
 @end
+@protocol CIRoundedRectangleStrokeGenerator <CIFilter>
+  @property (nonatomic) CGRect extent;
+  @property (nonatomic) float radius;
+  @property (nonatomic) float width;
+  @property (nonatomic, retain) CIColor *color;
+@end
 @protocol CIStarShineGenerator <CIFilter>
   @property (nonatomic) CGPoint center;
   @property (nonatomic, retain) CIColor *color;
@@ -758,6 +764,14 @@
   @property (nonatomic) float radius;
   @property (nonatomic) float intensity;
 @end
+@protocol CICannyEdgeDetector <CIFilter>
+  @property (nonatomic, retain, nullable) CIImage *inputImage;
+  @property (nonatomic) float gaussianSigma;
+  @property (nonatomic) bool perceptual;
+  @property (nonatomic) float thresholdHigh;
+  @property (nonatomic) float thresholdLow;
+  @property (nonatomic) NSInteger hysteresisPasses;
+@end
 @protocol CIComicEffect <CIFilter>
   @property (nonatomic, retain, nullable) CIImage *inputImage;
 @end
@@ -852,6 +866,9 @@
   @property (nonatomic, retain, nullable) CIImage *shadingImage;
   @property (nonatomic) float scale;
 @end
+@protocol CISobelGradients <CIFilter>
+  @property (nonatomic, retain, nullable) CIImage *inputImage;
+@end
 @protocol CISpotColor <CIFilter>
   @property (nonatomic, retain, nullable) CIImage *inputImage;
   @property (nonatomic, retain) CIColor *centerColor1;
@@ -1172,6 +1189,7 @@
 + (CIFilter<CIQRCodeGenerator>*) QRCodeGenerator;
 + (CIFilter<CIRandomGenerator>*) randomGeneratorFilter;
 + (CIFilter<CIRoundedRectangleGenerator>*) roundedRectangleGeneratorFilter;
++ (CIFilter<CIRoundedRectangleStrokeGenerator>*) roundedRectangleStrokeGeneratorFilter NS_AVAILABLE(14_0, 17_0);
 + (CIFilter<CIStarShineGenerator>*) starShineGeneratorFilter;
 + (CIFilter<CIStripesGenerator>*) stripesGeneratorFilter;
 + (CIFilter<CISunbeamsGenerator>*) sunbeamsGeneratorFilter;
@@ -1183,6 +1201,7 @@
 + (CIFilter<CIBlendWithMask>*) blendWithMaskFilter;
 + (CIFilter<CIBlendWithMask>*) blendWithRedMaskFilter;
 + (CIFilter<CIBloom>*) bloomFilter;
++ (CIFilter<CICannyEdgeDetector>*) cannyEdgeDetectorFilter NS_AVAILABLE(14_0, 17_0);
 + (CIFilter<CIComicEffect>*) comicEffectFilter;
 + (CIFilter<CIConvolution>*) convolution3X3Filter;
 + (CIFilter<CIConvolution>*) convolution5X5Filter;
@@ -1211,6 +1230,7 @@
 + (CIFilter<CIPointillize>*) pointillizeFilter;
 + (CIFilter<CISaliencyMap>*) saliencyMapFilter;
 + (CIFilter<CIShadedMaterial>*) shadedMaterialFilter;
++ (CIFilter<CISobelGradients>*) sobelGradientsFilter NS_AVAILABLE(14_0, 17_0);
 + (CIFilter<CISpotColor>*) spotColorFilter;
 + (CIFilter<CISpotLight>*) spotLightFilter;
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h	2023-03-09 23:53:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h	2023-05-31 03:49:27
@@ -51,7 +51,13 @@
 CORE_IMAGE_EXPORT CIFormat kCIFormatRGBAh NS_AVAILABLE(10_4, 6_0);
 CORE_IMAGE_EXPORT CIFormat kCIFormatRGBA16 NS_AVAILABLE(10_4, 10_0);
 CORE_IMAGE_EXPORT CIFormat kCIFormatRGBAf NS_AVAILABLE(10_4, 7_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatRGBX16 NS_AVAILABLE(11_0, 14_2);
+CORE_IMAGE_EXPORT CIFormat kCIFormatRGBXh NS_AVAILABLE(14_0, 17_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatRGBXf NS_AVAILABLE(14_0, 17_0);
 
+// RGB101010 stored in little-endian 32bit int, 2 MSB are ignored, full-range (0-1024)
+CORE_IMAGE_EXPORT CIFormat kCIFormatRGB10 NS_AVAILABLE(14_0, 17_0);
+
 CORE_IMAGE_EXPORT CIFormat kCIFormatA8 NS_AVAILABLE(10_11, 9_0);
 CORE_IMAGE_EXPORT CIFormat kCIFormatA16 NS_AVAILABLE(10_11, 9_0);
 CORE_IMAGE_EXPORT CIFormat kCIFormatAh NS_AVAILABLE(10_11, 9_0);
@@ -96,46 +102,80 @@
  * applied that will tone map to standard dynamic range (SDR).
  * The option will only have an effect if the image has a CGColorSpace that is high dynamic range (HDR).
  * This option can be useful if further usage of an image is not prepared for HDR values.
- *   If the value for this option is @YES, then the HDR input image will be tone mapped to working space SDR.
- *   If the value for this option is @NO, then the HDR  input image will be linearized to unclamped working space.
- *   If this option is not specified, then it will behave as if @NO was specified.
+ *
+ * If the value for this option is @YES, then the HDR input image will be tone mapped to working space SDR.
+ * If the value for this option is @NO, then the HDR input image will be linearized to unclamped working space.
+ * If this option is not specified, then it will behave as if @NO was specified.
  */
 CORE_IMAGE_EXPORT CIImageOption const kCIImageToneMapHDRtoSDR NS_AVAILABLE(11_0, 14_1);
 
-/* A boolean value specifying whether the image should sampled using "nearest neighbor" 
- * behavior.  If not specified, the image will be sampled using "linear sampling" */
+/* A boolean value specifying whether the image should be expanded to HDR if the image content support this.
+ * This option is supported by:
+ *     imageWithContentsOfURL:options:, initWithContentsOfURL:options,
+ *     imageWithData:options:,          initWithData:options:,
+ *
+ * If this option value is @YES, the image will expanded to a HDR colorspace if supported.
+ * If this option not present or the value is @NO, then the image will not be transformed.
+ */
+CORE_IMAGE_EXPORT CIImageOption const kCIImageExpandToHDR NS_AVAILABLE(14_0, 17_0);
+
+
+/* A boolean value specifying how the image should sampled. 
+ * If this option value is @YES, then the image will be sampled using nearest neighbor sampling.
+ * If this option value is @NO, then the image will be sampled using bilinear interpolation.
+ * If this option is not specified, then it will behave as if @NO was specified.
+ */
 CORE_IMAGE_EXPORT CIImageOption const kCIImageNearestSampling NS_AVAILABLE(10_13, 11_0);
 
 
+/* A boolean value specifying when the the image should be decoded.
+ * This option is supported by:
+ *     imageWithContentsOfURL:options:, initWithContentsOfURL:options,
+ *     imageWithData:options:,          initWithData:options:,
+ *     imageWithCGImage:options:,       initWithCGImage:options:,
+ *     imageWithCGImageSource:options:, initWithCGImageSource:options:
+ *
+ * If this option value is @YES, then if possible the image will be decoded into a non-volatile cache at initialization time.
+ * If this option value is @NO, then the image will be decoded into a volatile cache at render time.
+ * If not specified, CoreImage will decide when the image should be decoded. */
+CORE_IMAGE_EXPORT CIImageOption const kCIImageCacheImmediately;
+
+
 /* A NSDictionary of metadata properties to pass to CIImage initialization methods.
- * When used with imageWithCGImage:options:, initWithCGImage:options:, imageWithData:options:, initWithData:options:
- *   If this option is not specified, the properties will be set to CGImageSourceCopyPropertiesAtIndex.
- *   If this option is [NSNull null], the properties will be set to nil.
+ * If this option is not specified, the properties will be set to CGImageSourceCopyPropertiesAtIndex.
+ * If this option is [NSNull null], the properties will be set to nil.
  */
 CORE_IMAGE_EXPORT CIImageOption const kCIImageProperties NS_AVAILABLE(10_8, 5_0);
 
 
-/* A boolean value specifying whether the image should transformed according to orientation metadata properties.
- * This can be used with imageWithContentsOfURL: or initWithData: when the image contains orientation metadata
- * or with any of the initWith:options: method if the kCIImageProperties option is also provided.
- *   If this option value is @YES, the image will transformed according to the orientation metadata
- *   and the orientation metadata will be be removed.
- *   If this option not present or the value is @NO, then the image will not be transformed
- *   and the orientation metadata will left unaltered.
+/* A boolean value specifying that the image should transformed according to orientation metadata.
+ * This option is supported by:
+ *     imageWithContentsOfURL:options:, initWithContentsOfURL:options,
+ *     imageWithData:options:,          initWithData:options:,
+ *     imageWithCGImageSource:options:, initWithCGImageSource:options:
+ * when the image data contains orientation metadata or by any initialization method
+ * if the kCIImageProperties option is also provided.
+ *
+ * If this option value is @YES, the image will transformed according to the orientation metadata
+ * and the orientation metadata will be be removed.
+ * If this option value is @NO, then the image will not be transformed
+ * and the orientation metadata will left unaltered.
+ * If this option is not specified, then it will behave as if @NO was specified.
  */
 CORE_IMAGE_EXPORT CIImageOption const kCIImageApplyOrientationProperty NS_AVAILABLE(10_13, 11_0);
 
-
 CORE_IMAGE_EXPORT CIImageOption const kCIImageTextureTarget CI_GL_DEPRECATED_MAC(10_9,10_14);
 CORE_IMAGE_EXPORT CIImageOption const kCIImageTextureFormat CI_GL_DEPRECATED_MAC(10_9,10_14);
 
 
-/* The kCIImageAuxiliaryDepth or kCIImageAuxiliaryDisparity or kCIImageAuxiliaryPortraitEffectsMatte keys can be passed to the methods:
- + [CIImage imageWithContentsOfURL:options:]
- + [CIImage imageWithData:options:]
- If the value of one of these keys is @YES, the auxiliary image be returned instead of the primary image.
- If an auxiliary image is not present, then nil will be returned.
- The returned image will be a half float monochrome image.
+/* The kCIImageAuxiliary keys specify that an auxiliary image be returned instead of the primary image.
+ * These options are supported by:
+ *     imageWithContentsOfURL:options:, initWithContentsOfURL:options,
+ *     imageWithData:options:,          initWithData:options:,
+ *     imageWithCGImageSource:options:, initWithCGImageSource:options:
+ *
+ * If the value of any of these keys is @YES, the auxiliary image be returned if present.
+ * The returned image will be a monochrome image.
  */
 CORE_IMAGE_EXPORT CIImageOption const kCIImageAuxiliaryDepth NS_AVAILABLE(10_13, 11_0);
 CORE_IMAGE_EXPORT CIImageOption const kCIImageAuxiliaryDisparity NS_AVAILABLE(10_13, 11_0);
@@ -145,6 +185,7 @@
 CORE_IMAGE_EXPORT CIImageOption const kCIImageAuxiliarySemanticSegmentationTeethMatte NS_AVAILABLE(10_15, 13_0);
 CORE_IMAGE_EXPORT CIImageOption const kCIImageAuxiliarySemanticSegmentationGlassesMatte NS_AVAILABLE(11_0, 14_1);
 CORE_IMAGE_EXPORT CIImageOption const kCIImageAuxiliarySemanticSegmentationSkyMatte NS_AVAILABLE(11_1, 14_3);
+CORE_IMAGE_EXPORT CIImageOption const kCIImageAuxiliaryHDRGainMap NS_AVAILABLE(11_0, 14_1);
 
 
 /* Creates a new image from the contents of 'image'. */
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h	2023-03-09 23:53:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h	2023-05-31 03:49:28
@@ -11,6 +11,7 @@
 #ifdef __OBJC__
 
 #import <CoreImage/CIImage.h>
+#import <CoreImage/CIVector.h>
 
 #if TARGET_OS_OSX
 #import <IOSurface/IOSurface.h>
@@ -65,6 +66,19 @@
             arguments:(nullable NSDictionary<NSString*,id> *)arguments
            outputRect:(CGRect)outputRect;
 
+// Returns an array of CIVectors that specify tile regions for 'input' that are needed to satisfy 'outputRect'.
+// Each region tile in the array is a created by calling [CIVector vectorWithCGRect:roi]
+// The tiles may overlap but should fully cover the area of 'input' that is needed.
+// If a processor has multiple inputs, then each input should return the same number of region tiles.
+//
+// If the processor implements this method, then when rendered;
+//  - as CoreImage prepares for a render, this method will be called for each input to return the roiArray.
+//  - as CoreImage performs the render, the method 'processWithInputs:arguments:output:' will be called once for for each tile.
+//
++ (NSArray<CIVector*>*) roiTileArrayForInput:(int)input
+                                   arguments:(nullable NSDictionary<NSString*,id> *)arguments
+                                  outputRect:(CGRect)outputRect NS_AVAILABLE(14_0, 17_0);
+
 // Override this class method if you want your any of the inputs to be in a specific supported CIPixelFormat.
 // The format must be one of kCIFormatBGRA8, kCIFormatRGBAh, kCIFormatRGBAf or kCIFormatR8.
 // On iOS 12 and macOS 10.14, the formats kCIFormatRh and kCIFormatRf are also supported.
@@ -173,6 +187,10 @@
 // A 64-bit digest that uniquely describes the contents of the input to a processor.
 // This digest will change if the graph of the input changes in any way.
 @property (nonatomic, readonly) uint64_t digest NS_AVAILABLE(13_0, 16_0);
+
+// For processors that implement 'roiTileArrayForInput:arguments:outputRect:'
+@property (nonatomic, readonly) NSUInteger roiTileIndex NS_AVAILABLE(14_0, 17_0);
+@property (nonatomic, readonly) NSUInteger roiTileCount NS_AVAILABLE(14_0, 17_0);
 
 @end
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h	2023-03-09 19:16:58
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h	2023-05-31 08:52:21
@@ -183,8 +183,14 @@
 #if __CIKERNEL_METAL_VERSION__ >= 200
     namespace group
     {
+#if __CIKERNEL_METAL_VERSION__ >= 300
+        typedef struct Destination
+        {
+                Destination(float2 c_, uint2 gid_, float4 r_, float4x4 m_, texture2d<float, access::write> t_):c(c_), gid(gid_), r(r_), m(m_), t(t_) {}
+#else
         typedef struct
         {
+#endif //__CIKERNEL_METAL_VERSION__ >= 300
             // Returns the position, in working space coordinates, of the pixel currently being computed.
             // The destination space refers to the coordinate space of the image you are rendering.
             inline float2 coord() const { return c; }
@@ -201,8 +207,14 @@
             
         } __attribute__((packed)) destination;
         
+#if __CIKERNEL_METAL_VERSION__ >= 300
+        typedef struct Destination_h
+        {
+                Destination_h(float2 c_, uint2 gid_, float4 r_, float4x4 m_, texture2d<half, access::write> t_):c(c_), gid(gid_), r(r_), m(m_), t(t_) {}
+#else
         typedef struct
         {
+#endif //__CIKERNEL_METAL_VERSION__ >= 300
             // Returns the position, in working space coordinates, of the pixel currently being computed.
             // The destination space refers to the coordinate space of the image you are rendering.
             inline float2 coord() const { return c; }
@@ -227,14 +239,19 @@
     float4 unpremultiply(float4 s);
     
     float3 srgb_to_linear(float3 s);
+    float4 srgb_to_linear(float4 s);
+        
     float3 linear_to_srgb(float3 s);
-    
+    float4 linear_to_srgb(float4 s);
 #if __CIKERNEL_METAL_VERSION__ >= 200
     half4 premultiply(half4 s);
     half4 unpremultiply(half4 s);
 
     half3 srgb_to_linear(half3 s);
+    half4 srgb_to_linear(half4 s);
+        
     half3 linear_to_srgb(half3 s);
+    half4 linear_to_srgb(half4 s);
 #endif
     
     //MARK: - Relational Functions
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h	2023-03-09 23:50:20
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h	2023-05-31 05:03:27
@@ -198,6 +198,9 @@
 // This property will return how much time a render spent executing kernels.
 @property (readonly) NSTimeInterval kernelExecutionTime;
 
+// This property will return how much time a render spent compiling kernels.
+@property (readonly) NSTimeInterval kernelCompileTime NS_AVAILABLE(14_0, 17_0);
+
 // This property will return how many passes the render requires.
 // If passCount is 1 than the render can be fully concatinated and no
 // intermediate buffers will be required.
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes	2023-03-04 19:39:35
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes	2023-05-31 23:41:30
@@ -123,6 +123,10 @@
   SwiftName: properties
 - Name: kCIImageApplyOrientationProperty
   SwiftName: applyOrientationProperty
+- Name: kCIImageCacheImmediately
+  SwiftName: cacheImmediately
+- Name: kCIImageExpandToHDR
+  SwiftName: expandToHDR
 - Name: kCIImageTextureTarget
   SwiftName: textureTarget
 - Name: kCIImageTextureFormat
@@ -171,8 +175,6 @@
   SwiftName: opaque
 - Name: kCIImageCacheHint
   SwiftName: cacheHint
-- Name: kCIImageCacheImmediately
-  SwiftName: cacheImmediately
 - Name: kCIImageYCCMatrix
   SwiftName: YCCMatrix
 - Name: kCIImageIgnorePixelFormatFor601Fixup
@@ -207,6 +209,8 @@
   SwiftName: allowLowPower
 - Name: kCIContextName
   SwiftName: name
+- Name: kCIContextMemoryLimit
+  SwiftName: memoryTarget
 
 # CIContextOption - Private
 - Name: kCIContextDisableSoftwareFallback
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h	2023-03-09 23:53:27
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h	2023-06-01 00:05:10
@@ -38,23 +38,29 @@
 
 #ifdef __OBJC__
 #ifdef CI_SILENCE_GL_DEPRECATION
+  #if defined(TARGET_OS_XR) && TARGET_OS_XR
+  #define CI_GL_DEPRECATED(...)  API_UNAVAILABLE(xros)
+  #define CI_GL_DEPRECATED_IOS(...) API_UNAVAILABLE(xros)
+  #else
+  #define CI_GL_DEPRECATED(fromM,toM, fromI,toI)  NS_AVAILABLE(fromM,fromI)
   #define CI_GL_DEPRECATED_IOS(from, to)  NS_AVAILABLE_IOS(from)
+  #endif
   #define CI_GL_DEPRECATED_MAC(from, to)  NS_AVAILABLE_MAC(from)
-  #define CI_GL_DEPRECATED(fromM,toM, fromI,toI)  NS_AVAILABLE(fromM,fromI)
   #define CIKL_DEPRECATED(fromM,toM, fromI,toI)  NS_AVAILABLE(fromM,fromI)
 #else
+  #if defined(TARGET_OS_XR) && TARGET_OS_XR
+  #define CI_GL_DEPRECATED(...)  API_UNAVAILABLE(xros)
+  #define CI_GL_DEPRECATED_IOS(...) API_UNAVAILABLE(xros)
+  #else
+  #define CI_GL_DEPRECATED(fromM,toM, fromI,toI)  NS_DEPRECATED(fromM,toM, fromI,toI, "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
   #define CI_GL_DEPRECATED_IOS(from, to)  NS_DEPRECATED_IOS(from, to, "Core Image OpenGLES API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
+  #endif
   #define CI_GL_DEPRECATED_MAC(from, to)  NS_DEPRECATED_MAC(from, to, "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
-  #define CI_GL_DEPRECATED(fromM,toM, fromI,toI)  NS_DEPRECATED(fromM,toM, fromI,toI, "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
   #define CIKL_DEPRECATED(fromM,toM, fromI,toI)  NS_DEPRECATED(fromM,toM, fromI,toI, "Core Image Kernel Language API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)")
 #endif
 #endif
 
-#if TARGET_OS_MAC || !TARGET_OS_SIMULATOR || defined(__IPHONE_13_0)
-  #define COREIMAGE_SUPPORTS_IOSURFACE 1
-#else
-  #define COREIMAGE_SUPPORTS_IOSURFACE 0
-#endif
+#define COREIMAGE_SUPPORTS_IOSURFACE 1
 
 #define UNIFIED_CORE_IMAGE 1
 
Clone this wiki locally