BrainByte
Topic Author
Posts: 8
Joined: 09 Mar 2019, 09:34

Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 13:44

On Unity version 2018.3.5f1 on OSX with the latest version of Noesis v2.2.1

When running the project it consistently crashes with the following editor log message

MTLRenderPipelineDescriptorInternal validateWithDevice failed assertion rasterSampleCount (0) is not supported by device

I have the Editor and Graphics API set to AUTO and Unity editor shows that it is using METAL

Any suggestions to resolve ?

I belive Metal should be supported in the latest version of Noesis v2.2.1 on OSX
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 13:49

Are you using multilayered cameras (cameras rendering to the same target with different depths) ?
 
BrainByte
Topic Author
Posts: 8
Joined: 09 Mar 2019, 09:34

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 14:01

Yes I do have two cameras one with different depths for UI overlay ( moving from old UI to Noesis ) and other for the game
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 14:03

It is a bug in Unity we are trying to workaround: https://www.noesisengine.com/bugs/view.php?id=1427

Please, try setting the culling mask to 'Nothing'
 
BrainByte
Topic Author
Posts: 8
Joined: 09 Mar 2019, 09:34

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 14:14

Ok thanks I've changed the culling mask and it seems to be working.
 
BrainByte
Topic Author
Posts: 8
Joined: 09 Mar 2019, 09:34

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 14:16

Spoke to soon :( crashed again

Is this required on all cameras ?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

05 Apr 2019, 14:18

We are trying to understand the way to workaround this bug. But I think that setting it to the camera rendering Noesis should be enough. Could you please try the simple scene I have attached in the bug and tell me if that's different from your scenario?
 
BrainByte
Topic Author
Posts: 8
Joined: 09 Mar 2019, 09:34

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

07 Apr 2019, 11:49

I've tried the project attached to the bug and it works ok, however my project is quite different.

I am working on an RTS game with two cameras. The game starts ok and works until I pan the camera that's when unity crashes.

If I switch the Graphics API to OpenGL it works but fails consistently on Metal

Is it possible that Metal isn't being detected and calls are being made against OpenGL ?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

08 Apr 2019, 17:52

The problem is that there is a bug in Unity with Metal. They are incorrectly sending parameters to our native callback. We are trying to workaround the issue.

Does the proposed workaround (the last NoesisView.cs posted by Nokola) fix the issue for you?
 
BrainByte
Topic Author
Posts: 8
Joined: 09 Mar 2019, 09:34

Re: Unity crashes on OSX when Graphics API (Auto) using Metal

10 Apr 2019, 15:52

I've been performing some more tests with the changes you recommended it appears to be more stable ( culling mask ).

The crash I experienced after the change must have been related to Unity not Noesis.

Who is online

Users browsing this forum: Ahrefs [Bot] and 36 guests