metallib:错误读取模块:无效的位码签名 [英] metallib: Error reading module: Invalid bitcode signature

查看:338
本文介绍了metallib:错误读取模块:无效的位码签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下Filter.metal文件

I have following Filter.metal file

#include <metal_stdlib>
using namespace metal;
#include <CoreImage/CoreImage.h> // includes CIKernelMetalLib.h

extern "C" { namespace coreimage {

    float4 myColor(sample_t s) {

        return s.grba;
    }

}}

我正在尝试使用以下命令进行编译:

I am trying to compile it with:

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 教程.

I am trying to create a custom CIFIlter and I followed this: https://medium.com/@shu223/core-image-filters-with-metal-71afd6377f4 tutorial.

我从 https://developer.apple.com/metal/MetalCIKLReference6 .pdf .

如何编译没有错误的文件?

How can I compile my file without this error?

推荐答案

错误报告者的响应是:

Apple开发人员关系
2018年10月29日,上午4:08

Apple Developer Relations
October 29 2018, 4:08 AM

工程技术为您提供以下反馈:

Engineering has the following feedback for you:

此处的文档不正确.应该添加一个"-c"来强制生成AIR文件,即

The documentation is incorrect here. One should add a "-c" to force an AIR file, i.e.,

xcrun metal -fcikernel MyKernels.metal -c -o MyKernels.air

我们现在正在关闭此错误报告.

We are now closing this bug report.

如果您对解决方案有任何疑问或意见,请使用该信息更新错误报告,以便我们回复.

If you have questions or comments about the resolution, please update your bug report with that information so we can respond.

这篇关于metallib:错误读取模块:无效的位码签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆