Skip to content
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

No available Apple Silicon download #1849

Open
Michael-Z-Freeman opened this issue Oct 2, 2023 · 9 comments
Open

No available Apple Silicon download #1849

Michael-Z-Freeman opened this issue Oct 2, 2023 · 9 comments

Comments

@Michael-Z-Freeman
Copy link

Hi,

I thought there was an older but still usable Apple Silicon version of UPBGE ? I'm sure I downloaded it before but I can't find it now.

Can I compile from source for Apple Silicon ? I have some experience with solving build problems so may be able to help with this.

Michael

@lordloki
Copy link
Member

lordloki commented Oct 4, 2023

Hi,

The Silicon build is here: https://mega.nz/folder/t9EEFSaS#JPiOPSInCZyU-SW_-rhEOQ

Currently I'm trying to cross-compile (from an intel mac) to get an apple silicon build but no success at this moment. I can help you with the build if you want.

@Michael-Z-Freeman
Copy link
Author

Hi,

The Silicon build is here: https://mega.nz/folder/t9EEFSaS#JPiOPSInCZyU-SW_-rhEOQ

Currently I'm trying to cross-compile (from an intel mac) to get an apple silicon build but no success at this moment. I can help you with the build if you want.

Great. I'm on an Apple Silicon device (M1). Where are the build instructions ?

@Michael-Z-Freeman
Copy link
Author

OK. I built Blender first using https://wiki.blender.org/wiki/Building_Blender/Mac ... Successful build. Seems to work OK but don't know how stable it is. It's also Alpha (4.1.0).

Did the same for UPBGE and it built OK. However hitting "P" on the default cube project crashes it. This is likely because its 4.1.0 Alpha ? If so how do I build a stable UPBGE ?

UPBGE Blender Crash Report Default Project.txt
UPBGE Apple Silicon MacOS Crash Report Default Project.txt
UPBGE 4 1 0 Alpha Apple Silicon Build Splash Screen
UPBGE executable Apple Silicon type CLI
Blender executable Apple Silicon type CLI
Blender 4 1 0 Alpha Apple Silicon Build Splash Screen

@lordloki
Copy link
Member

Currently, blender 4.1 alpha or upbge 0.41 alpha for MacOS uses Metal for the viewport. The crash comes from the upbge reasterizer when it tries to uses opengl .
image

I'm trying to remove all the Opengl calls for macos to start testing metal port. I will inform you to make tests.
Thanks for your feedback.

@Michael-Z-Freeman
Copy link
Author

Michael-Z-Freeman commented Oct 16, 2023

Currently, blender 4.1 alpha or upbge 0.41 alpha for MacOS uses Metal for the viewport. The crash comes from the upbge reasterizer when it tries to uses opengl . image

I'm trying to remove all the Opengl calls for macos to start testing metal port. I will inform you to make tests. Thanks for your feedback.

Ah. Thanks.

Can the viewport renderer be temporarily switched away from Metal for the moment back to OpenGL either within Blender itself (I can't see an option for this) or with command line build option ?

@gratoo
Copy link

gratoo commented Jan 16, 2024

Any luck on this? I'd like to help if possible. Where should I start looking to understand and solve that issue?

@Michael-Z-Freeman
Copy link
Author

Michael-Z-Freeman commented Jan 30, 2024

Any luck on this? I'd like to help if possible. Where should I start looking to understand and solve that issue?

Blender upstream has an Apple Silicon download. Of course that Blender does not have the game engine anymore. So UPBGE OpenGL calls are coming from the game engine which of course was never fixed for Apple Silicon because it was removed from Blender main years ago. I wonder if a wrapper is available such as we see with DXVK ( https://github.com/doitsujin/dxvk ) that can translate from OpenGL to Metal ?

https://github.com/openglonmetal/MGL ? ... "This is a start for porting OpenGL 4.6 on top of Metal".

https://github.com/kakashidinho/metalangle ? ... "MetalANGLE - OpenGL ES to Apple Metal API Translation Layer".

https://www.reddit.com/r/opengl/comments/qtxgph/its_alive_opengl_45_on_mac_os_metal/ ? ... "It's alive OpenGL 4.5 on Mac OS Metal".

@gratoo
Copy link

gratoo commented Feb 20, 2024

Thanks Michael.

By the way I built the game engine from the upbge-v0.36-release branch on a Intel Mac and I ran into the exact same issue. It crashes at the exact same place in GetNumLights() in RAS_OpenGLRasterizer.cpp.

I'm trying to re-build the official upbge-0.36.1-macOS-x86_64.dmg from the source which runs fine on my Intel and M1 Mac. Do you guys know what I'm missing?

@Michael-Z-Freeman
Copy link
Author

Thanks Michael.

By the way I built the game engine from the upbge-v0.36-release branch on a Intel Mac and I ran into the exact same issue. It crashes at the exact same place in GetNumLights() in RAS_OpenGLRasterizer.cpp.

I'm trying to re-build the official upbge-0.36.1-macOS-x86_64.dmg from the source which runs fine on my Intel and M1 Mac. Do you guys know what I'm missing?

UPBGE uses EEVEE right ? EEVEE works in latest Blender using macOS Metal. So UPBGE needs to hook into the EEVEE Metal calls not OpenGL. Not as easy as it sounds I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants