Dolphin, the GameCube and Wii emulator - Forums

Full Version: MoltenVK Support for macOS is now open source
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know it was pushed around that you guys should use MoltenVK but since it was closed source you didn't want to use it. I so understand that. But now it seems MoltenVK is now opensource
https://arstechnica.com/gadgets/2018/02/...-to-apple/

I know you guys are working on a metal version but this would solve your issues without having to really make too many modifications. I thought you guys would like to know. You guys are always trying to support Mac when its really hard to and I understand. I hope this helps you out and thanks again for making one of the best damn emulators on the planet.

VinDuv

I’m not a core Dolphin developper, but I’ve decided to take a look at this.
At expected, there isn’t too much to change in Dolphin to get MoltenVK running. I’ve pushed my changes here: https://github.com/VinDuv/dolphin/tree/moltenvk
For now, the MoltenVK lib (libMoltenVK.dylib — can be built from https://github.com/KhronosGroup/MoltenVK) needs to be copied in the Dolphin app bundle, in the same directory as the executable (in Dolphin.app/Contents/MacOS)
For the moment, basically nothing works Tongue A Metal assertion error is hit during initialization, which looks like this MoltenVK bug.
I’ve applied the workaround indicated in the bug report, and the emulation starts… except that some shaders fail to compile Undecided It seems like it’s caused by other MoltenVK issues; I’ve opened a bug report about it.
So basically, MoltenVK looks promising, but for now using Dolphin with it won’t display much more than a black screen (the rendering statistics do show up though!)
In the other threads that were made about this, it was mentioned that a native Metal backend was already being worked on. It might be a worthwhile effort to keep on trying MoltenVK, even if it only serves to provide the MoltenVK people with test cases, but it's not strictly necessary to do anything as a Metal backend will end up in master-branch Dolphin at some point.
(03-23-2018, 08:17 AM)VinDuv Wrote: [ -> ]I’m not a core Dolphin developper, but I’ve decided to take a look at this.
At expected, there isn’t too much to change in Dolphin to get MoltenVK running. I’ve pushed my changes here: https://github.com/VinDuv/dolphin/tree/moltenvk
For now, the MoltenVK lib (libMoltenVK.dylib — can be built from https://github.com/KhronosGroup/MoltenVK) needs to be copied in the Dolphin app bundle, in the same directory as the executable (in Dolphin.app/Contents/MacOS)
For the moment, basically nothing works Tongue A Metal assertion error is hit during initialization, which looks like this MoltenVK bug.
I’ve applied the workaround indicated in the bug report, and the emulation starts… except that some shaders fail to compile Undecided It seems like it’s caused by other MoltenVK issues; I’ve opened a bug report about it.
So basically, MoltenVK looks promising, but for now using Dolphin with it won’t display much more than a black screen (the rendering statistics do show up though!)

Using your MoltenVK version, with the latest changes to the github repository for Spir-V Cross which addressed dual-source blending (and the depth clear patch applied to MVK), i was actually able to get a game (Smash Bros Brawl) running and displaying video! although it seemed to have had a small error which caused it to crash (i'm unsure the cause though). It seems that if MVK was supported, it would be fairly quick merging the changes between the Vulkan codebase and it to support Mac, given how much works with little changes to the VK codebase.
Well, moltenvk is a translation layer, so it's going to have a performance hit compared to making a proper Metal backend - which is what Stenzek has been doing. Big Grin So there isn't really much reason for us to support MoltenVK when we'll have a direct Metal backend.