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:
John Kessenich 2015-06-16 19:01:56 +00:00
parent 99a3c59fae
commit edadf45605
5 changed files with 48 additions and 18 deletions

View file

@ -155,7 +155,7 @@ void TInputScanner::consumeWhitespaceComment(bool& foundNonSpaceTab)
// or no #version was found; otherwise, returns false. There is no error case, it always
// succeeds, but will leave version == 0 if no #version was found.
//
// Sets versionNotFirstToken based on whether tokens (beyond white space and comments)
// Sets notFirstToken based on whether tokens (beyond white space and comments)
// appeared before the #version.
//
// N.B. does not attempt to leave input in any particular known state. The assumption