Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions renderer/backend/metal/command_buffer_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

// TODO(dnfield): remove this declaration when we no longer need to build on
// machines with lower SDK versions than 11.0.s
#if !defined(MAC_OS_X_VERSION_11_0) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_11_0
typedef enum MTLCommandEncoderErrorState : NSInteger {
#if !defined(MAC_OS_VERSION_11_0) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_11_0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Mac engine builders except for the Mac Web Engine are running Xcode 13 (which has MAC_OS_VERSION_11_0 defined)
https://github.com/flutter/engine/blob/289368cadccbce88913b3ab279ed754d705740f9/.ci.yaml#L73

Mac Web Engine Xcode migration blocked on flutter/flutter#99885
https://github.com/flutter/engine/blob/289368cadccbce88913b3ab279ed754d705740f9/.ci.yaml#L327

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a guard for the macOS 12 defines too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So once Mac Web engine rolls we can remove the first block here - we won't be able to remove the second until we further upgrade.

typedef NS_ENUM(NSInteger, MTLCommandEncoderErrorState) {
MTLCommandEncoderErrorStateUnknown = 0,
MTLCommandEncoderErrorStateCompleted = 1,
MTLCommandEncoderErrorStateAffected = 2,
Expand All @@ -65,6 +65,12 @@
} API_AVAILABLE(macos(11.0), ios(14.0));
#endif


#if !defined(MAC_OS_VERSION_12_0) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_12_0
constexpr int MTLCommandBufferErrorAccessRevoked = 4;
constexpr int MTLCommandBufferErrorStackOverflow = 12;
#endif

API_AVAILABLE(ios(14.0), macos(11.0))
NSString* MTLCommandEncoderErrorStateToString(
MTLCommandEncoderErrorState state) {
Expand Down