Disable MTLCommandBufferErrorOptionEncoderExecutionStatus in release mode (flutter/engine#40453)

This commit is contained in:
Dan Field
2023-03-20 13:48:39 -07:00
committed by GitHub
parent 77e0592065
commit f016a17df7

View File

@@ -111,6 +111,7 @@ static bool LogMTLCommandBufferErrorIfPresent(id<MTLCommandBuffer> buffer) {
}
static id<MTLCommandBuffer> CreateCommandBuffer(id<MTLCommandQueue> 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<MTLCommandBuffer> CreateCommandBuffer(id<MTLCommandQueue> queue) {
desc.errorOptions = MTLCommandBufferErrorOptionEncoderExecutionStatus;
return [queue commandBufferWithDescriptor:desc];
}
#endif // FLUTTER_RELEASE
return [queue commandBuffer];
}