Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1018 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 1018 Bytes

Tools for examining Apple's Metal shaders.

Contents

  • unmetallib.py: extracts .metallib files to .air files.
  • sampleshader/: contains:
    • a Metal shader from Apple's HelloTriangle project
    • the compiled metallib using Xcode 9.3's metal compiler
    • the .air files recompiled to x86_64 and arm64 assembly using LLVM 6.0.0 to show that Metal shaders are valid LLVM Bitcode and can be processed using normal LLVM tools.

Other Metal projects you might find useful

License

My code (unmetallib.py, sampleshader/*.sh) is under the MIT license.

sampleshader/AAPLShaders.metal and sampleshader/AAPLShaderTypes.h are taken from Apple's HelloTriangle project. Their license can be found in sampleshader/AAPLShaders_LICENSE.txt (also MIT license)