I’ve seen a lot of metal projects and they all seem to require a virtual machine to run to do runtime translation which made me think
Why can’t we do this without a virtual machine why do we need runtime vgpu translation ?
Then I started and I saw why they went the VM route. Metal is so weird in some places compared to Vulkan or D3D but after countless HOURS (and still ongoing!)
I present to you guys Iron which is, to my knowledge the most complete Metal1 and MSL compiler implantation for any given Metal version (I know darling exists but they don’t say hey we implement 100% of this Metal standard)
Iron is a source compatible Metal implementation, not binary compatible (drop in replacement if you use metalcpp they have the same exact api) it currently has the Vulkan backend wired in with D3D12 coming only after I finish Metal2 but the neutral IR allows anyone to layer metal over any backend they want it was made with a neutral implementation in mind to allow this it isn’t hard locked to Vulkan.
Who would benefit from this? Anyone working with metalcpp and wanting their code to work as is on other platforms. Someone can easily make a objc wrapper over this but this is outside my goal
Current numbers:
Metal 1: 1027 / 1086
MSL 1.0: 9/526 (MSL1.1 and MSL1.2 come after 1.0 is done they are part of the Metal1 gate)
Sources:
Metal documentation from Apple
Metal cpp from Apple (the fact they open sourced this means a project like this was bound to happen sooner or later)
Commandline tools only for total symbols
IRON DOES NOT TAKE OR USE ANY PRIVATE APPLE API ALL METAL BEHAVIORS AND QUIRKS ARE IMPLEMENTED BY USING A BLACK BOX APPROACH OF RUNNING METAL AND VULKAN THEIR COMPARING THEIR BYTE OUTPUTS!!!!