Disable MTLCommandBufferErrorOptionEncoderExecutionStatus in release mode (flutter/engine#40453)
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user