Closed mkrus closed 4 months ago
Common/MVKCommonEnvironment.h#L73 iirc has been renamed to TARGET_OS_VISION, if you change it and rebuild does it fix the issue?
For the second issue, iirc visionOS apps don't use UIKit or AppKit so UIScreen and NSScreen don't exist, you'd need to somehow loop through the SwiftUI views (if possible) and get the first instance of a CAMetalLayer (if it exists)
Just noticed the last statement about screens, ignore my last bit.
PR #2161 fixes this.
Trying to build MoltenVK for vision OS but getting errors, with latest Xcode and SDKs.
This produces a few deprecated API warnings, and:
1/ a warning on MVKOSExtensions.h:70:1: warning: non-void function does not return a value. Seems like MVK_VISIONOS is not defined
2/ a compile error on MVKSwapchain.mm:193:35: error: property 'screenMVK' not found on object of type 'CAMetalLayer *' visionOS does support screens so that code should not be there.
Full log at https://pastebin.com/eP3jgM3Y