From a74af7c1628fe5a9c615e045e6ec381b94ebe8e2 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 13 Apr 2022 16:39:26 -0700 Subject: [PATCH 1/4] keep going --- renderer/backend/metal/command_buffer_mtl.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/backend/metal/command_buffer_mtl.mm b/renderer/backend/metal/command_buffer_mtl.mm index f5a96674..deed7d15 100644 --- a/renderer/backend/metal/command_buffer_mtl.mm +++ b/renderer/backend/metal/command_buffer_mtl.mm @@ -56,7 +56,7 @@ // 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 { +typedef NS_ENUM(NSInteger, MTLCommandEncoderErrorState) { MTLCommandEncoderErrorStateUnknown = 0, MTLCommandEncoderErrorStateCompleted = 1, MTLCommandEncoderErrorStateAffected = 2, From 9049ff1e86a250063c786031e98bc5ab258d4e75 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 13 Apr 2022 16:53:00 -0700 Subject: [PATCH 2/4] misspelled macro --- renderer/backend/metal/command_buffer_mtl.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/backend/metal/command_buffer_mtl.mm b/renderer/backend/metal/command_buffer_mtl.mm index deed7d15..feb13ed6 100644 --- a/renderer/backend/metal/command_buffer_mtl.mm +++ b/renderer/backend/metal/command_buffer_mtl.mm @@ -55,7 +55,7 @@ // 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 +#if !defined(MAC_OS_VERSION_11_0) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_11_0 typedef NS_ENUM(NSInteger, MTLCommandEncoderErrorState) { MTLCommandEncoderErrorStateUnknown = 0, MTLCommandEncoderErrorStateCompleted = 1, From b2008978fc004a273dbd3fedf6ca0aaaeebf51e7 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 13 Apr 2022 17:19:11 -0700 Subject: [PATCH 3/4] define more constants for older SDKs --- renderer/backend/metal/command_buffer_mtl.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderer/backend/metal/command_buffer_mtl.mm b/renderer/backend/metal/command_buffer_mtl.mm index feb13ed6..98dee118 100644 --- a/renderer/backend/metal/command_buffer_mtl.mm +++ b/renderer/backend/metal/command_buffer_mtl.mm @@ -63,6 +63,9 @@ typedef NS_ENUM(NSInteger, MTLCommandEncoderErrorState) { MTLCommandEncoderErrorStatePending = 3, MTLCommandEncoderErrorStateFaulted = 4, } API_AVAILABLE(macos(11.0), ios(14.0)); + +constexpr int MTLCommandBufferErrorAccessRevoked = 4; +constexpr int MTLCommandBufferErrorStackOverflow = 12; #endif API_AVAILABLE(ios(14.0), macos(11.0)) From 14928a7f7d7169e951ce2836df8b05d00225e374 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 13 Apr 2022 17:33:44 -0700 Subject: [PATCH 4/4] v12 --- renderer/backend/metal/command_buffer_mtl.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderer/backend/metal/command_buffer_mtl.mm b/renderer/backend/metal/command_buffer_mtl.mm index 98dee118..4382c6d8 100644 --- a/renderer/backend/metal/command_buffer_mtl.mm +++ b/renderer/backend/metal/command_buffer_mtl.mm @@ -63,7 +63,10 @@ typedef NS_ENUM(NSInteger, MTLCommandEncoderErrorState) { MTLCommandEncoderErrorStatePending = 3, MTLCommandEncoderErrorStateFaulted = 4, } 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