Dolphin, the GameCube and Wii emulator - Forums

Full Version: [macOS] Using Metal API with Dolphin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(08-11-2016, 11:42 PM)DoctorMac Wrote: [ -> ]My logic is probably hampered, but I'm wondering if one could just replace all the OpenGL code and redirect it to use Metal. It looks like that could work, more or less.

Removing OpenGL support isn't necessary, you "just" have to write new code that uses Metal. That's not a small amount of code to write, though...
Just replacing GL calls would result in a worse backend than OGL is right now on OSX. You should start from scratch, or the null backend.

And it's not *that* much, maybe so 5k to 10k lines of code Wink
(08-11-2016, 11:55 PM)JosJuice Wrote: [ -> ]Removing OpenGL support isn't necessary, you "just" have to write new code that uses Metal. That's not a small amount of code to write, though...

I wasn't saying to remove OpenGL code; I was saying to have that as a starting point. Which probably wouldn't work too well.
A wrapper seems like the best solution.  At the moment the only reason we need Metal is for speed, not functionality.  So a wrapper of reasonable quality  would likely give us some gains in speed and require minimal effort compared to a true backend.  Metal has been said to be extremely easy to work with compared to other low level API's.  Hopefully it would only take one or two people to maintain something like that.  Considering DX12 only took one person for a mostly functioning backend,  I think eventually a disgruntled OSX user with serious coding experience will walk in.
(08-20-2016, 01:36 PM)Nintonito Wrote: [ -> ]A wrapper seems like the best solution. 

I'm pretty sure the OSX wrapper for OpenGL to their internal API (which is likely at least as low as Metal) is better than anything we could write. So just use OpenGL instead of thinking of a wrapper. Low level API is only good if you use the API wise. So either write a full Metal backend, or forget this dream.
(09-17-2016, 12:48 AM)DatKid20 Wrote: [ -> ]https://moltengl.com

That isn't useful for us. Dolphin can't include proprietary code.
With 10.12 Sierra it seems Apple has included enough Metal functionality to bind/wrap OpenGL 4.3 calls to the API.  If that brought a significant enough speedup it could be worthwhile as an alternative to a full backend.  Although I'm sure if we had the man power for a full backend that would eclipse anything suggested.
I really wish my developer skills were a little higher and more experienced.. I would love to work on something like this, especially since I really need some solid side projects for my resume.
I am also interested in Metal for Dolphin. I just wanted to let you guys know there are more people who would love this feature. Also wanted to say thank you guys for making one of the most awesome emulators out there.
Pages: 1 2 3