Post

Replies

Boosts

Views

Activity

CIKernel Unable to Load Compiled ci.metallib
This question pertains to both wwdc21-10159 and wwdc20-10009. Let's say I have a simple Core Image kernel that does some simple operation as shown below. #include <metal_stdlib> #include <CoreImage/CoreImage.h> // includes CIKernelMetalLib.h using namespace metal; extern "C" float4 HDRHighlight(coreimage::sample_t s, float time, coreimage::destination dest) {   return float4(2.0, 0.0, 0.0, 1.0); } In my build rules, I have the appropriate command to compile and link the .ci.metal source into the ci.metallib library. I can confirm internally in the resources that this library file is generated. However, when I import the kernel using CIColorKernel in Swift, I am given an error that states the kernel function failed to load. In the logs, I see that it says: [api] reflect Function 'HDRHighlight' does not exist. Fatal error: Unable to load the kernel.
3
0
1.8k
Mar ’22
CIKernel Unable to Load Compiled ci.metallib
This question pertains to both wwdc21-10159 and wwdc20-10009. Let's say I have a simple Core Image kernel that does some simple operation as shown below. #include <metal_stdlib> #include <CoreImage/CoreImage.h> // includes CIKernelMetalLib.h using namespace metal; extern "C" float4 HDRHighlight(coreimage::sample_t s, float time, coreimage::destination dest) {   return float4(2.0, 0.0, 0.0, 1.0); } In my build rules, I have the appropriate command to compile and link the .ci.metal source into the ci.metallib library. I can confirm internally in the resources that this library file is generated. However, when I import the kernel using CIColorKernel in Swift, I am given an error that states the kernel function failed to load. In the logs, I see that it says: [api] reflect Function 'HDRHighlight' does not exist. Fatal error: Unable to load the kernel.
Replies
3
Boosts
0
Views
1.8k
Activity
Mar ’22