Vulkan to Metal translation layer in Mesa3D?
There are 2 goals to this issue:
- Understand how the Mesa3D community feels about having a Vulkan to Metal translation layer exist within the project.
- Get Mesa3D developers’ concerns on technical feasibility for the project we may not be aware of.
We are evaluating the feasibility and value of creating a Vulkan to Metal translation layer in the Mesa3D project. The project would cover Apple silicon GPUs, specifically M1/A14 and later. The decision to cover these GPU families is due to the fact that Metal does not have the same features available in all hardware, and these GPUs are the ones with features that would simplify the implementation of the translation layer.
As always, there are pros and cons that need to be considered. There are existing translation layers that have proven the success of this such as Dozen and Zink. Moreover, there are also existing solutions in other Vulkan implementations that solve some of the Vulkan to Metal translation issues that could be leveraged.
While it is true that the framework to develop Vulkan drivers in Mesa3D is a huge factor that weighs in favor of this project, there is also work to be done to use existing utilities and tools like NIR for such a project. These present extra challenges and work that needs to be done since there is no NIR to Metal Shading Language (MSL) translation for example. There may also be other unknowns that we are not aware of at the moment of writing, and for this we would like to ask the community to bring them up in this issue so we can tackle the project with as much information as possible at hand.
As mentioned at the beginning of the issue, please do let us know your thoughts. Looking forward to hearing from the Mesa3D community!