Skip to content

Commit

Permalink
Fix issue with visionOS not being defined (#3327)
Browse files Browse the repository at this point in the history
VisionOS SDK was introduced in xcode 15.2.
xcode 15.0, 15.1 do not have the visionOS platform defined.
Additionally, if you use a different llvm such as llvm 17 or 18 from
homebrew, the platform might not be defined even when using xocde 15.2 or
newer.
  • Loading branch information
bwrsandman authored Jul 20, 2024
1 parent e41cbeb commit 987a6f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/renderer_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ static uint32_t getEntryProperty(io_registry_entry_t _entry, CFStringRef _proper
#ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
# define __MAC_OS_X_VERSION_MAX_ALLOWED 0
#endif
#ifndef __VISION_OS_VERSION_MAX_ALLOWED
# define __VISION_OS_VERSION_MAX_ALLOWED 0
#endif

#ifndef BX_XCODE_15
# define BX_XCODE_15 (0 \
Expand Down Expand Up @@ -462,11 +465,10 @@ static uint32_t getEntryProperty(io_registry_entry_t _entry, CFStringRef _proper
)
#endif // BX_XCODE_12

#if BX_XCODE_15
#if __VISION_OS_VERSION_MAX_ALLOWED >= 10000
# define VISION_OS_MINIMUM visionOS 1.0,
#else
# define VISION_OS_MINIMUM
# warning "XCode 15 is required for visionOS"
#endif

#define SHADER_FUNCTION_NAME "xlatMtlMain"
Expand Down

0 comments on commit 987a6f8

Please sign in to comment.