Remove @synchronized from MTLFunction specialization to avoid reentrant hang.
This commit is contained in:
parent
0b90a53d76
commit
a1e33384c1
@ -470,14 +470,12 @@ id<MTLFunction> MVKFunctionSpecializer::newMTLFunction(id<MTLLibrary> mtlLibrary
|
||||
unique_lock<mutex> lock(_completionLock);
|
||||
|
||||
compile(lock, ^{
|
||||
@synchronized (_owner->getMTLDevice()) {
|
||||
[mtlLibrary newFunctionWithName: funcName
|
||||
constantValues: constantValues
|
||||
completionHandler: ^(id<MTLFunction> mtlFunc, NSError* error) {
|
||||
bool isLate = compileComplete(mtlFunc, error);
|
||||
if (isLate) { destroy(); }
|
||||
}];
|
||||
}
|
||||
[mtlLibrary newFunctionWithName: funcName
|
||||
constantValues: constantValues
|
||||
completionHandler: ^(id<MTLFunction> mtlFunc, NSError* error) {
|
||||
bool isLate = compileComplete(mtlFunc, error);
|
||||
if (isLate) { destroy(); }
|
||||
}];
|
||||
});
|
||||
|
||||
return [_mtlFunction retain];
|
||||
|
Loading…
x
Reference in New Issue
Block a user