Fix warning

Change-Id: I7f017aa0a842c40e5041529f5e3d7b9a03989a65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422116
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2021-06-25 17:13:23 -04:00 committed by Skia Commit-Bot
parent 9f745d90d0
commit 702fb679f3

View File

@ -803,7 +803,6 @@ bool GrMtlPipelineStateBuilder::PrecompileShaders(GrMtlGpu* gpu, const SkData& c
pipelineDescriptor.fragmentFunction =
[fragmentLibrary newFunctionWithName: @"fragmentMain"];
NSError* error = nil;
#if GR_METAL_SDK_VERSION >= 230
if (@available(macOS 11.0, iOS 14.0, *)) {
id<MTLBinaryArchive> archive = gpu->binaryArchive();
@ -811,6 +810,7 @@ bool GrMtlPipelineStateBuilder::PrecompileShaders(GrMtlGpu* gpu, const SkData& c
NSArray* archiveArray = [NSArray arrayWithObjects:archive, nil];
pipelineDescriptor.binaryArchives = archiveArray;
BOOL result;
NSError* error = nil;
{
TRACE_EVENT0("skia.shaders", "addRenderPipelineFunctionsWithDescriptor");
result = [archive addRenderPipelineFunctionsWithDescriptor: pipelineDescriptor