Hard code to ES profile for #version 100.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20334 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-01-28 18:28:28 +00:00
parent 868933d668
commit cc2f8022d4

View File

@ -752,19 +752,20 @@ void SetVersion(int version)
} }
} }
const int FirstProfileVersion = 150;
// Important assumption: SetVersion() is called before SetProfile(), and is always called // Important assumption: SetVersion() is called before SetProfile(), and is always called
// if there is a version, sending in a ENoProfile if there is no profile given. // if there is a version, sending in a ENoProfile if there is no profile given.
void SetProfile(EProfile profile) void SetProfile(EProfile profile)
{ {
const int FirstProfileVersion = 150;
TParseContext& parseContext = *((TParseContext *)cpp->pC); TParseContext& parseContext = *((TParseContext *)cpp->pC);
if (profile == ENoProfile) { if (profile == ENoProfile) {
if (parseContext.version == 300) { if (parseContext.version == 300) {
CPPErrorToInfoLog("version 300 requires specifying the 'es' profile"); CPPErrorToInfoLog("version 300 requires specifying the 'es' profile");
parseContext.profile = ENoProfile; parseContext.profile = EEsProfile;
} else if (parseContext.version >= FirstProfileVersion) } else if (parseContext.version == 100)
parseContext.profile = EEsProfile;
else if (parseContext.version >= FirstProfileVersion)
parseContext.profile = ECoreProfile; parseContext.profile = ECoreProfile;
else else
parseContext.profile = ENoProfile; parseContext.profile = ENoProfile;