Hi guys, I have managed to get the Cocos2d-x v4 branch to build on macOS 10.15 beta using the Xcode 11 beta toolchain by using CMake 3.14 as that has built-in support for generating iOS Xcode projects without the need for a custom toolchain script.
I have created a PR for this work, which I hope will be considered for merging into upstream/v4.
I have had cpp-tests running on an iOS 13 device however while it also builds for the iOS 13 Simulator (which has hardware support for Metal) it crashes due to a shader compile error, which I have yet to look into.
-A
@zhangxm can take a look at this PR when he can.
The PR is currently failing as the CI machine has CMake 3.10 installed
The error I am getting compiling the metal shader has also been seen by another user on the Apple Developer Forums when running on the iOS Simulator, so it might be a beta-thing and not a real error.
@trojanfoe great job, i will try to upgrade CMake version installed in CI machines.
Yeah I noticed there is a mac-cmake test, so I guess you can also add a ios-cmake and iossim-cmake test as well Good integration testing though!
Having installed macOS 10.15 beta 6 and Xcode 11 beta 6 the issue with compiling the Metal shaders is now solved.
However the simulator is now asserting with:
MTLDebugValidateMTLPixelFormat:1433: failed assertion `pixelFormat (42) is not a valid MTLPixelFormat.'
It doesn’t seem to like pixel format MTLPixelFormatABGR4UNorm
. This seems OK as there will need to be conditional code for macOS/Simulator compared to iOS with respect to buffer sharing modes etc and I think this is one such example.
I am departing for holidays so won’t have time to look at this until next week.
@trojanfoe thanks for the information. There is a bad news that i don’t know how to update ci’s cmake version. I have added some comments in your PR.
I have now fixed the pixel format issue under iOS Simulator with a simple change. See this PR.