From f016a17df726c0692a7d4f70634737b5b40c9872 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Mon, 20 Mar 2023 13:48:39 -0700 Subject: [PATCH] Disable MTLCommandBufferErrorOptionEncoderExecutionStatus in release mode (flutter/engine#40453) --- .../impeller/renderer/backend/metal/command_buffer_mtl.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/flutter/impeller/renderer/backend/metal/command_buffer_mtl.mm b/engine/src/flutter/impeller/renderer/backend/metal/command_buffer_mtl.mm index 2e8a5f7d8a..27c17b0bae 100644 --- a/engine/src/flutter/impeller/renderer/backend/metal/command_buffer_mtl.mm +++ b/engine/src/flutter/impeller/renderer/backend/metal/command_buffer_mtl.mm @@ -111,6 +111,7 @@ static bool LogMTLCommandBufferErrorIfPresent(id buffer) { } static id CreateCommandBuffer(id queue) { +#ifndef FLUTTER_RELEASE if (@available(iOS 14.0, macOS 11.0, *)) { auto desc = [[MTLCommandBufferDescriptor alloc] init]; // Degrades CPU performance slightly but is well worth the cost for typical @@ -118,6 +119,7 @@ static id CreateCommandBuffer(id queue) { desc.errorOptions = MTLCommandBufferErrorOptionEncoderExecutionStatus; return [queue commandBufferWithDescriptor:desc]; } +#endif // FLUTTER_RELEASE return [queue commandBuffer]; }