-
Notifications
You must be signed in to change notification settings - Fork 459
Add MoltenVK support on macOS #6590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Vulkan is not listed on Android cause it produces graphical issues. FPS is higher than OpenGL, but the game is full of blinking artifacts. Tested on Pixel 7, Pixel 7 Pro and Pixel 8. On macOS, Vulkan works good through MoltenVK (see my patches to Veldrid and Vk). Perfomance is on the same level with Metal, but MoltenVK offers uncapped to 60 FPS. Also, Vulkan performance is definitely better than OpenGL. On Windows and Linux, not all GPUs support Vulkan, so the check is good to see there imo.
|
There was a point in time where I would've been jumping for joy at this, but these days I'm not particularly interested in getting this in right now because I plan to replace Veldrid with SDL_gpu first. The Veldrid VK backend is itself riddled with issues particularly around memory management and very often crashes/deadlocks on native drivers (Windows/Linux) (for instance), and I would rather not add yet another translation layer in the middle until that's resolved. |
|
There is no way I am ever seeing this happen for macOS, sorry. It makes zero sense. |
Yeah, in case of future graphics backend switch, I agree with your point. I still can provide more testing if needed. |
|
Maybe it will be ok not to bundle, but to add an option for players to use system-wide MoltenVK installation, if it's present. That would exclude 2 commits for MoltenVK building. The library from Homebrew works good. |
|
Why don't you want to merge just fixes? I've said that I may cut this PR to not bundle in MoltenVK, you've just closed the PR with no any other words. I don't see any new maintaining difficulties for you if you'll merge just some lines of code, which don't break API or something like that. |
|
On M1 I got a lot better results in osu!lazer through MoltenVK. It sounds weird for me too, but this is just what it is. It just worked more stable, I've got lower rendering latency. Moreover! I get a lot more stable FPS and lower latency even on osu!stable through Rosetta 2 and DXVK. I've been a lazer player from the start of playing osu, it's hard for me to switch to stable, working through multiple translation layers. |
|
The change does not align with the direction of osu!framework, which is to provide the best osu! experience possible. As of recent, we are very aware of scope and do not want to expand scope beyond what we are comfortable with, as we are a very small team. Having support for it in the code base is a negative in my eyes. We would need a way to ensure users cannot enable this for osu!, because we would not want this to be an option. There is no way we would want to support a non-metal option on mac platforms because it would be a support nightmare for our team. Luckily, you can very easily include your changes in a fork and consume it for your own osu!framework consuming projects without much overhead. That's the beauty of open source, which is a reason we created the framework under a very permissive licence and with all the build tools you need to make this happen. |
|
ok, I'm going to play stable for singleplayer. no problem. UPD: Issues I had were successfully fixed by buying M4 Max MacBook Pro. I'd be very shocked if not. |
Sometimes MoltenVK performs better than Metal while trying to play Windows games on Mac through DirectX translation layers. Therefore I've thought of trying to use Vulkan in osu!, cause Metal is capped at 60FPS and produces visible tearing if you try to turn FPS up to get at least higher updates rate. OpenGL works awfully on M1, thanks to Apple for very basic support of it.
I've found that some code in Vk, Veldrid and even osu-framework shows that there were some movements in this direction, but all of them are incomplete (at least nowadays). My chain of PRs introduces critical fixes for MoltenVK to work.
Performance is almost like Metal, but without the FPS cap and sometimes even more stable.
Also, the default 2x frame rate graphics option finally works on macOS with MoltenVK. With OpenGL it was laggy enough to make FPS drop below 120, with Metal it was capped at 60.
To sum up, I think that adding MoltenVK support is reasonable. At least for some period for testing on more devices (I've not compared performance on Mac with AMD GPU).
This PR also provides script and workflow to bundle MoltenVK with osu.
My device is MacBook Air M1 (7-core GPU).
Required PRs:
Frame time graphs mid-game:
