Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling Metal shaders from source on iOS 13 Simulator gives PCH error

Tags:

I am working on the Cocos2d-x v4 branch which introduces Metal backend support and uses glsl-optimizer to convert GLSL to MSL for compilation at runtime using newLibraryWithSource:options:error:.

This works fine compiling using Xcode 11 beta for an iOS 13 device, however when compiling for iOS 13 Simulator the shader fails to compile with the following error:

Error: PCH file built from a different branch ((metalfe-902.9.49)) than the compiler ((metalfe-902.9.52))

Does anyone have any ideas?

More details: At the time of asking this question I was using Xcode 11 beta 5 on macOS 10.15 beta 5. I have now updated to macOS 10.15 beta 6 and there is no change. I suspect this might be solved by an update to Xcode 11 beta.

like image 281
trojanfoe Avatar asked Aug 16 '19 05:08

trojanfoe


1 Answers

This issue was solved by using Xcode 11 beta 6.

like image 193
trojanfoe Avatar answered Nov 13 '22 07:11

trojanfoe