glslang: In ShFinalize: 1) Delete CommonSymbolTable entries. 2) After deleting objects, set the pointers to NULL. This allows us to cleanly restart glslang a second time in the same process, because it forces a new allocation. Contributor: Andrew Woloszyn (awoloszyn@google.com).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31110 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
bb8c3de8b3
commit
57193ecdc3
@ -644,14 +644,28 @@ void ShDestruct(ShHandle handle)
|
||||
//
|
||||
int __fastcall ShFinalize()
|
||||
{
|
||||
for (int version = 0; version < VersionCount; ++version)
|
||||
for (int p = 0; p < ProfileCount; ++p)
|
||||
for (int lang = 0; lang < EShLangCount; ++lang)
|
||||
for (int version = 0; version < VersionCount; ++version) {
|
||||
for (int p = 0; p < ProfileCount; ++p) {
|
||||
for (int lang = 0; lang < EShLangCount; ++lang) {
|
||||
delete SharedSymbolTables[version][p][lang];
|
||||
SharedSymbolTables[version][p][lang] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int version = 0; version < VersionCount; ++version) {
|
||||
for (int p = 0; p < ProfileCount; ++p) {
|
||||
for (int pc = 0; pc < EPcCount; ++pc) {
|
||||
delete CommonSymbolTable[version][p][pc];
|
||||
CommonSymbolTable[version][p][pc] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PerProcessGPA) {
|
||||
PerProcessGPA->popAll();
|
||||
delete PerProcessGPA;
|
||||
PerProcessGPA = 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user