godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.48k stars 21.26k forks source link

No Godot v4.3 build will launch any projects on macOS Sonoma (OpenCore) #95226

Open Binpuki opened 3 months ago

Binpuki commented 3 months ago

Tested versions

System information

macOS Sonoma (OpenCore) - Godot v4.3.rc2.mono.official - Vulkan (Forward+) - 2.7 GHz 12-Core Intel Xeon E5 - AMD FirePro D700 6 GB

Issue description

Before in Godot v4.2.2.stable, I could work with Forward+, but in Godot v4.3.rc2, any project I try to open up just crashes. Opening it up with the terminal gives this error message:

binpuki@vipro unnamedgame % /Applications/Godot\ Engine/Godot\ 4.3\ RC2.app/Contents/MacOS/Godot -e
Godot Engine v4.3.rc2.mono.official.3978628c6 - https://godotengine.org
Vulkan 1.2.283 - Forward+ - Using Device #0: AMD - AMD Radeon HD - FirePro D700

-[_MTLCommandEncoder dealloc]:131: failed assertion `Command encoder released without endEncoding'
zsh: abort      /Applications/Godot\ Engine/Godot\ 4.3\ RC2.app/Contents/MacOS/Godot -e
binpuki@vipro unnamedgame % 

If it opens, I'm running macOS Sonoma on a Mac Pro 2013 with OpenCore.

Steps to reproduce

Open any project with the Godot editor, doesn't matter if it's an old or a new project.

Minimal reproduction project (MRP)

N/A

akien-mga commented 3 months ago

I'm not familiar with OpenCore, but I assume that using recent macOS versions with Metal on unsupported hardware (2013 Mac Pro) is bound to have bugs in the graphics stack. 4.3 has a lot of rendering changes, as well as updates to the Metal/MoltenVK version used. The crash you get is in the Metal driver and not something Godot can accommodate, aside from trying to not do what's causing the crash (but if it's done by MoltenVK, that's outside our control).

I would suggest trying to bisect the regression to see what's the first build that stops working for you. You can start by testing previous dev/beta/RC snapshots to narrow down the range.

Binpuki commented 3 months ago

Update: seems like something like this has happened to another software, is there any way to implement this change into Godot? Sorry I haven't had time to narrow down the issue!

https://github.com/gfx-rs/wgpu/pull/4023

akien-mga commented 3 months ago

I'm no Metal expert, but I believe that if this is the issue, it probably lays in MoltenVK, which is what we use to convert Vulkan to Metal. Godot itself has no Metal code included (for now).

There's a PR adding native Metal support which you could try and see if this solves your issue: https://github.com/godotengine/godot/pull/88199

If so, since it will eventually replace our current MoltenVK integration, we could consider that it fixes this bug.

Binpuki commented 3 months ago

Seems like this PR only adds native Metal support to arm64-based Apple devices. I'm running on a Mac Pro 2013 w/ OpenCore, which probably isn't the most stable thing ever.