Add a new shader-versioning infrastructure capable of handling multiple profiles, desktop/ES, many versions, features coming and going in different versions across different profiles, and extensions.

NB: *Use* of this infrastructure is so far only skeletal.

Fixed a few typos and minor issues along the way.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19951 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2012-12-13 00:05:26 +00:00
parent 5d3e2e35b6
commit 9fd55bd338
31 changed files with 1662 additions and 706 deletions

View file

@ -739,8 +739,8 @@ bool TParseContext::arrayQualifierErrorCheck(int line, TPublicType type)
return true;
}
if (type.qualifier == EvqConst && extensionErrorCheck(line, "GL_3DL_array_objects"))
return true;
if (type.qualifier == EvqConst)
profileRequires(line, ENoProfile, 120, "GL_3DL_array_objects", "const array");
return false;
}
@ -948,20 +948,6 @@ bool TParseContext::paramErrorCheck(int line, TQualifier qualifier, TType* type)
}
}
bool TParseContext::extensionErrorCheck(int line, const char* extension)
{
if (extensionBehavior[extension] == EBhWarn) {
infoSink.info.message(EPrefixWarning, ("extension " + TString(extension) + " is being used").c_str(), line);
return false;
}
if (extensionBehavior[extension] == EBhDisable) {
error(line, "extension", extension, "is disabled");
return true;
}
return false;
}
/////////////////////////////////////////////////////////////////////////////////
//
// Non-Errors.
@ -1448,7 +1434,7 @@ void TParseContext::initializeExtensionBehavior()
// example code: extensionBehavior["test"] = EBhDisable; // where "test" is the name of
// supported extension
//
extensionBehavior["GL_ARB_texture_rectangle"] = EBhRequire;
extensionBehavior["GL_ARB_texture_rectangle"] = EBhDisable;
extensionBehavior["GL_3DL_array_objects"] = EBhDisable;
}
@ -1457,7 +1443,7 @@ OS_TLSIndex GlobalParseContextIndex = OS_INVALID_TLS_INDEX;
bool InitializeParseContextIndex()
{
if (GlobalParseContextIndex != OS_INVALID_TLS_INDEX) {
assert(0 && "InitializeParseContextIndex(): Parse Context already initalised");
assert(0 && "InitializeParseContextIndex(): Parse Context already initialised");
return false;
}
@ -1467,7 +1453,7 @@ bool InitializeParseContextIndex()
GlobalParseContextIndex = OS_AllocTLSIndex();
if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "InitializeParseContextIndex(): Parse Context already initalised");
assert(0 && "InitializeParseContextIndex(): Parse Context already initialised");
return false;
}
@ -1477,13 +1463,13 @@ bool InitializeParseContextIndex()
bool InitializeGlobalParseContext()
{
if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "InitializeGlobalParseContext(): Parse Context index not initalised");
assert(0 && "InitializeGlobalParseContext(): Parse Context index not initialized");
return false;
}
TThreadParseContext *lpParseContext = static_cast<TThreadParseContext *>(OS_GetTLSValue(GlobalParseContextIndex));
if (lpParseContext != 0) {
assert(0 && "InitializeParseContextIndex(): Parse Context already initalised");
assert(0 && "InitializeParseContextIndex(): Parse Context already initialized");
return false;
}
@ -1513,7 +1499,7 @@ TParseContextPointer& GetGlobalParseContext()
bool FreeParseContext()
{
if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "FreeParseContext(): Parse Context index not initalised");
assert(0 && "FreeParseContext(): Parse Context index not initialized");
return false;
}
@ -1529,7 +1515,7 @@ bool FreeParseContextIndex()
OS_TLSIndex tlsiIndex = GlobalParseContextIndex;
if (GlobalParseContextIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "FreeParseContextIndex(): Parse Context index not initalised");
assert(0 && "FreeParseContextIndex(): Parse Context index not initialized");
return false;
}