How does MoltenVK work with Metal?


This topic contains 4 replies, has 3 voices, and was last updated by  Bill Hollings 2 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1052

    Agent J
    Participant

    Does MoltenVK convert Vulkan code to Metal code or does it just make that process easier?

    By the way, I’m not a Vulkan developer, I’m just a curious Mac user.

    #1053

    Bill Hollings
    Keymaster

    I’m not clear what you mean by “convert Vulkan code to Metal code”, but I’ll take a stab at answering.

    MoltenVK is a Vulkan implementation, and you use the standard Vulkan API in your application or game. You do not need to use any Metal functionality. For example, you can take an application or game written for Vulkan on another platform and run it unchanged on iOS and OS X using MoltenVK as the Vulkan implementation. MoltenVK uses Metal under the covers.

    This portability includes the shaders. Vulkan uses SPIR-V shaders, and MoltenVK accepts them, and converts them automatically to the Metal Shading Language for use on iOS and OS X. You do not need to convert your shaders from one platform to the other.

    I hope this answers your question. If not, please clarify the specifics you are looking for.

    …Bill

    #1054

    Agent J
    Participant

    That’s awesome!

    That answers my question perfectly.

    Thanks!

    #1139

    edsel.malasig
    Participant

    Vulkan uses SPIR-V shaders, and MoltenVK accepts them, and converts them automatically to the Metal Shading Language for use on iOS and OS X. You do not need to convert your shaders from one platform to the other

    i am a bit confused at this.

    #1140

    Bill Hollings
    Keymaster

    @edsel.malasig

    What part confuses you? Do you have a particular question that we could answer to help clarify things?

    The README_MoltenVK_UserGuide.md document in the Molten download package discusses the automatic conversion of SPIR-V shaders to MSL shaders in significant detail.

    …Bill

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘MoltenVK Support’ is closed to new topics and replies.