glslang::GetGlobalLock();
++NumberOfClients;
- glslang::ReleaseGlobalLock();
if (PerProcessGPA == nullptr)
PerProcessGPA = new TPoolAllocator();
glslang::HlslScanContext::fillInKeywordMap();
#endif
+ glslang::ReleaseGlobalLock();
return 1;
}
--NumberOfClients;
assert(NumberOfClients >= 0);
bool finalize = NumberOfClients == 0;
- glslang::ReleaseGlobalLock();
- if (! finalize)
+ if (! finalize) {
+ glslang::ReleaseGlobalLock();
return 1;
+ }
for (int version = 0; version < VersionCount; ++version) {
for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) {
glslang::HlslScanContext::deleteKeywordMap();
#endif
+ glslang::ReleaseGlobalLock();
return 1;
}