作者:mis安小米 | 来源:互联网 | 2022-12-01 13:41
我有以下Filter.metal文件
#include
using namespace metal;
#include // includes CIKernelMetalLib.h
extern "C" { namespace coreimage {
float4 myColor(sample_t s) {
return s.grba;
}
}}
我正在尝试将其编译为:
xcrun metal -fcikernel Filter.metal -o Filter.air
xcrun metallib -cikernel Filter.air -o Filter.metallib
但是我得到这个错误:
metallib: Error reading module: Invalid bitcode signature
我正在尝试创建自定义CIFIlter,我遵循以下步骤:https ://medium.com/@shu223/core-image-filters-with-metal-71afd6377f4
教程。
我从https://developer.apple.com/metal/MetalCIKLReference6.pdf获得的命令行。
如何编译没有此错误的文件?
1> Terus..:
错误记者的回复是:
Apple Developer Relations
2018年10月29日,上午4:08
工程为您提供以下反馈:
这里的文档不正确。应该添加一个“ -c”来强制生成AIR文件,即
xcrun metal -fcikernel MyKernels.metal -c -o MyKernels.air
现在,我们正在关闭此错误报告。
如果您对解决方案有任何疑问或意见,请使用该信息更新错误报告,以便我们回复。