1 个不稳定版本
0.2.0 | 2019 年 3 月 12 日 |
---|
#30 in #metal
15KB
365 代码行
Metal Info (mtl-info
)
Metal Info 是一个命令行工具,用于解码和处理 Apple 的 Metal 库文件 metallib
。
安装
mtl-info
与 cargo 一起分发。如果已安装 Rust 和 Cargo,请按照以下命令在您的系统上安装它。
cargo install mtl-info
# Check build output. If $PATH is setup correctly you can now run
mtl-info --help
用法
列出条目
用于列出 Metal 库中每个金属片段或顶点着色器的名称。
mtl-info ./default.metallib list
处理着色器代码
Metal 库文件包含 LLVM 位代码,可以反汇编成更易读的汇编格式。
# Find entry by name
mtl-info ./default.metallib bitcode --with-name outlineRetina_frag
# Find entry by index
mtl-info ./default.metallib bitcode --with-index 3
依赖关系
~0.9–8MB
~50K SLoC