mupen64plus / mupen64plus-core

Core module of the Mupen64Plus project
1.3k stars 257 forks source link

Support for Metal on macOS/iOS #574

Open gh0sti opened 6 years ago

gh0sti commented 6 years ago

Dear Team, With macOS 10.14 Apple has decided to deprecate OpenGL/CL, in the near future mupen64 will not be able to run on macOS or iOS image

Will you guys look into possibly porting mupen64 to metal?

loganmc10 commented 6 years ago

The GFX plugin would need to support Metal, currently no n64 GFX plugin supports Metal, so there is no point in mupen64plus supporting that API. You need to find a GFX plugin developer willing to add that to a GFX plugin

rlabrecque commented 6 years ago

Is there any vulkan based plugins? Could probably use MoltenVK?

loganmc10 commented 6 years ago

No there is not currently a Vulkan based GFX plugin either (retroarch has one but it is not maintained)

dankcushions commented 6 years ago

deprecated!=removed. it's just not going to be supported/updated. arguably it's been that way for quite a while on osx/ios.

opengl stuff will still work on both.

richard42 commented 6 years ago

I hate to say it, but Apple is the new Microsoft. This was a very bad thing for them to do to the software development community. It's one thing for them to deprecate their own obsolete technologies (32-bit quicktime), but to abandon open standards and force everyone to re-write all their code, is another.

Narann commented 6 years ago

It's one thing for them to deprecate their own obsolete technologies (32-bit quicktime), but to abandon open standards and force everyone to re-write all their code, is another.

I totally agree with this. I'm not in favor of proprietary API because you have no idea how it will evolve and you can have invest a lot of testing and time to an API to see it finally put in a trash. But Microsoft did a very decent job with D3D9 (letting peoples switch to other API OGL/VK/D3D11+) . But Apple is saying f.ck you to peoples writing and maintaining softwares. That's crazy how a short term view it can be.

What I'm afraid of would be the monkey patch coming in PR saying: "Metal support, please merge or this mean you have no respect for your users...".

Maybe a polite "That's cool, please fork it." can be an answer, or we would have code to remove in few years.

I don't know how other emu devs will handle this. It require resources. Dolphin devs would certainly add support (then maybe drop it because no one want to maintain it, like they did with D3D12). Maybe libretro is already doing the job. I don't know if GlideN64 have any plan.

ghost commented 6 years ago

Well GLideN64 should have a plan. They got themselves into this mess.

JoaoPinheiro commented 5 years ago

What are the pieces that would need to be rewritten for Metal if someone would like to pick up the task?

richard42 commented 5 years ago

Well the graphics handling software is split in a few different places in Mupen64plus. A relatively small amount of code is in the core library (called the Video Extension) and optionally in the front-end application as well, to create and manage graphics contexts. This is necessary in order to support features like embedded OpenGL windows in a GUI app. It would be nice to extend this code to support the creation and management of Metal contexts as well, though it's probably not necessary. The bigger part of the code is in the video plugin. A skilled developer could either A) start with an existing plugin written for a different graphics API, and adapt it to Metal, or B) write a new one from scratch. These would both take a good amount of work from a very talented developer, but option A would probably take much less work than B. If a developer started with a video plugin that already used shaders for everything, then it might not be terribly hard.