glslang: Add API override of version and profile for testing purposes. From Lei Zhang <antiagainst@google.com>.
Add defaultProfile and forceDefaultVersionAndProfile into shader compilation interface. forceDefaultVersionAndProfile allows us to force parsing the input shaders using defaultVersion and defaultProfile, regardless of the #version directive in input shaders. These two parameters enables us to programmatically invoke glslang but specify version and profile from somewhere else like command line. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31504 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
99a3c59fae
commit
edadf45605
5 changed files with 48 additions and 18 deletions
|
|
@ -265,20 +265,6 @@ const char* TParseContext::getPreamble()
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Map from profile enum to externally readable text name.
|
||||
//
|
||||
const char* ProfileName(EProfile profile)
|
||||
{
|
||||
switch (profile) {
|
||||
case ENoProfile: return "none";
|
||||
case ECoreProfile: return "core";
|
||||
case ECompatibilityProfile: return "compatibility";
|
||||
case EEsProfile: return "es";
|
||||
default: return "unknown profile";
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// When to use requireProfile():
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue