Rationalize naming/access to current thread-local-storage scheme. However, the preprocessor tokenizer is not thread-safe, so this may all change.
Also adding missing test. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22249 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
1fde51d3fb
commit
73ed17a87b
10 changed files with 48 additions and 21 deletions
|
|
@ -2038,10 +2038,10 @@ bool InitializeParseContextIndex()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool InitializeGlobalParseContext()
|
||||
bool InitializeThreadParseContext()
|
||||
{
|
||||
if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) {
|
||||
assert(0 && "InitializeGlobalParseContext(): Parse Context index not initialized");
|
||||
assert(0 && "InitializeThreadParseContext(): Parse Context index not initialized");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -2053,7 +2053,7 @@ bool InitializeGlobalParseContext()
|
|||
|
||||
TThreadParseContext *lpThreadData = new TThreadParseContext();
|
||||
if (lpThreadData == 0) {
|
||||
assert(0 && "InitializeGlobalParseContext(): Unable to create thread parse context");
|
||||
assert(0 && "InitializeThreadParseContext(): Unable to create thread parse context");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -2063,7 +2063,7 @@ bool InitializeGlobalParseContext()
|
|||
return true;
|
||||
}
|
||||
|
||||
TParseContextPointer& GetGlobalParseContext()
|
||||
TParseContextPointer& ThreadLocalParseContext()
|
||||
{
|
||||
//
|
||||
// Minimal error checking for speed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue