Introduce a base class for Builder objects.

All builder objects will depend from this "Builder" base class. This
will allow having the builder callback logic in only one place.
This commit is contained in:
Corentin Wallez
2017-05-08 10:52:11 +02:00
committed by Corentin Wallez
parent 4b410a33ca
commit 5dc7915d38
26 changed files with 202 additions and 212 deletions

View File

@@ -678,7 +678,7 @@ namespace metal {
newComputePipelineStateWithFunction:function error:&error];
if (error != nil) {
NSLog(@" error => %@", error);
device->HandleError("Error creating pipeline state");
builder->HandleError("Error creating pipeline state");
return;
}
@@ -720,7 +720,7 @@ namespace metal {
newRenderPipelineStateWithDescriptor:descriptor error:&error];
if (error != nil) {
NSLog(@" error => %@", error);
device->HandleError("Error creating pipeline state");
builder->HandleError("Error creating pipeline state");
return;
}
@@ -898,7 +898,7 @@ namespace metal {
mtlLibrary = [device->GetMTLDevice() newLibraryWithSource:mslSource options:nil error:&error];
if (error != nil) {
NSLog(@"MTLDevice newLibraryWithSource => %@", error);
device->HandleError("Error creating MTLLibrary from MSL source");
builder->HandleError("Error creating MTLLibrary from MSL source");
}
}