csinkers/ualbion

Test on macOS

csinkers opened this issue · 2 comments

As UAlbion is based on .NET 5 and Veldrid, it should theoretically also be able to run on macOS using Metal. As I lack any appropriate hardware, I'm not currently able to test to what extent this actually works, or fix any issues with it. It would be good if someone more familiar with the platform could look into this.

I just tried it on my Mac Mini (with M1 chip).

After adding the missing checks for OSPlatform.OSX to GetConfigBaseDir() and GetCacheBaseDir(), I was able to run it.

Using the metal backend, I was hit by the "pink screen" Veldrid issue (veldrid/veldrid#402):
Screen Shot 2021-09-11 at 20 43 18

Using OpenGL there was a texture binding error (might be related to bugs in Apple's OpenGL shader compiler: https://blog.dengine.net/2021/01/wonders-and-mysteries-of-the-m1/):

UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D_ARRAY is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

Screen Shot 2021-09-11 at 20 43 00

I will recompile everything as x86_64 and run it using rosetta - that way I am also able to test the Vulkan backend.

Interesting! Looks like it's closer to running that I'd expected to be honest. The OpenGL issue could be related to loading assets more than the usage of GL, as the button outlines are drawn - those colours are coming from a very simple texture that is dynamically generated.

As far as Metal goes, I think you can run it under xcode as a graphical debugger to investigate further, there was some discussion about doing so in the Veldrid discord recently.