IRObject* pOutIR = IRCompilerAllocCompileAndLink( pCompiler, NULL, pDXIL, & pError) Compile DXIL to Metal IR: IRError* pError = nullptr IRObject* pDXIL = IRObjectCreateFromDXIL( bytecode, size, IRBytecodeOwnershipNone) IRCompilerSetEntryPointName( pCompiler, "MainVSEntry") IRCompiler* pCompiler = IRCompilerCreate() In its most basic form, Metal shader converter takes a DXIL file as input and produces a metallib. The Metal shader converter executable offers several options to customize code generation. The Metal shader converter and libmetalirconverter support both Windows and macOS. To convert shaders from DXIL to Metal IR, you use Metal shader converter as a standalone executable ( metal-shaderconverter) or as a dynamic library ( libmetalirconverter). If you build a Metal library for earlier OS versions, not all features will be supported. Metal libraries built using Metal shader converter tools require a device that supports Argument Buffers Tier 2, running macOS 14 Sonoma, iOS 17 or later. Metal shader converter for Windows requires Microsoft Windows 10 or later and Microsoft Visual Studio 2019. Metal shader converter requires macOS 13 Ventura or later and Xcode 15. metal_irconverter_runtime.h helps perform common tasks when working with pipeline states built from IR generated by Metal shader converter. This document also presents metal_irconverter_runtime.h, a lightweight, header-only library that accompanies Metal shader converter. This document describes the IR conversion process, explains the binding model, synchronization considerations, and reflection capabilities, then provides general guidance and examples. All the functionality exposed through the library interface is available via the standalone executable. It’s available as a library and a standalone executable. Metal shader converter converts shader intermediate representations in LLVM IR bytecode into bytecode suitable to be loaded into Metal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |