Implement __VERSION__ macro, make ftransform() non-ES only, add more tests.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22000 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-06-13 23:56:04 +00:00
parent fb7044a9a8
commit f78fff94e9
7 changed files with 20 additions and 4 deletions

View file

@ -1027,8 +1027,8 @@ int MacroExpand(int atom, yystypepp* yylvalpp, int expandUndef)
}
if (atom == __VERSION__Atom) {
strcpy(yylvalpp->symbol_name, "100");
yylvalpp->sc_int = atoi(yylvalpp->symbol_name);
yylvalpp->sc_int = GetVersion(cpp->pC);
sprintf(yylvalpp->symbol_name, "%d", yylvalpp->sc_int);
UngetToken(CPP_INTCONSTANT, yylvalpp);
return 1;

View file

@ -117,6 +117,7 @@ int GetStringNumber(void); // Get the current String Number.
const char* GetStrfromTStr(void); // Convert TString to String.
void SetVersion(int);
void SetProfile(EProfile);
int GetVersion(void*);
void updateExtensionBehavior(const char* extName, const char* behavior);
int FreeCPP(void);

View file

@ -83,7 +83,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
typedef struct CPPStruct_Rec CPPStruct;
// Multi-threading note: The existence of this global makes
// TODO: threading: Multi-threading note: The existence of this global makes
// this preprocessing single-threaded only.
extern CPPStruct *cpp;