From cc2f8022d43d00b3609e13d3d0e31b22ef952f83 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 28 Jan 2013 18:28:28 +0000 Subject: [PATCH] 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 --- glslang/MachineIndependent/glslang.l | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/glslang/MachineIndependent/glslang.l b/glslang/MachineIndependent/glslang.l index 40170759..86bac745 100644 --- a/glslang/MachineIndependent/glslang.l +++ b/glslang/MachineIndependent/glslang.l @@ -752,19 +752,20 @@ void SetVersion(int version) } } -const int FirstProfileVersion = 150; - // 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. void SetProfile(EProfile profile) { + const int FirstProfileVersion = 150; TParseContext& parseContext = *((TParseContext *)cpp->pC); if (profile == ENoProfile) { if (parseContext.version == 300) { CPPErrorToInfoLog("version 300 requires specifying the 'es' profile"); - parseContext.profile = ENoProfile; - } else if (parseContext.version >= FirstProfileVersion) + parseContext.profile = EEsProfile; + } else if (parseContext.version == 100) + parseContext.profile = EEsProfile; + else if (parseContext.version >= FirstProfileVersion) parseContext.profile = ECoreProfile; else parseContext.profile = ENoProfile;