Make the PP report an error on undefined macro in "#if ..." for ES profiles, unless relaxed error checking is requested. Still works as normal CPP on non-ES.
Also, improved error reporting in general for the PP. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21417 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
465f452749
commit
52ac67e913
11 changed files with 252 additions and 163 deletions
|
|
@ -470,14 +470,14 @@ static int FindHashLoc(AtomTable *atable, const char *s)
|
|||
char str[200];
|
||||
sprintf(str, "*** Hash failed with more than %d collisions. Must increase hash table size. ***",
|
||||
HASH_TABLE_MAX_COLLISIONS);
|
||||
CPPShInfoLogMsg(str);
|
||||
ShPpErrorToInfoLog(str);
|
||||
|
||||
sprintf(str, "*** New string \"%s\", hash=%04x, delta=%04x", s, collision[0], hashdelta);
|
||||
CPPShInfoLogMsg(str);
|
||||
ShPpErrorToInfoLog(str);
|
||||
for (ii = 0; ii <= HASH_TABLE_MAX_COLLISIONS; ii++) {
|
||||
sprintf(str, "*** Collides on try %d at hash entry %04x with \"%s\"",
|
||||
ii + 1, collision[ii], GetAtomString(atable, atable->htable.entry[collision[ii]].value));
|
||||
CPPShInfoLogMsg(str);
|
||||
ShPpErrorToInfoLog(str);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
|
@ -720,14 +720,14 @@ void PrintAtomTable(AtomTable *atable)
|
|||
|
||||
for (ii = 0; ii < atable->nextFree; ii++) {
|
||||
sprintf(str, "%d: \"%s\"", ii, &atable->stable.strings[atable->amap[ii]]);
|
||||
CPPDebugLogMsg(str);
|
||||
ShPpDebugLogMsg(str);
|
||||
}
|
||||
sprintf(str, "Hash table: size=%d, entries=%d, collisions=",
|
||||
atable->htable.size, atable->htable.entries);
|
||||
CPPDebugLogMsg(str);
|
||||
ShPpDebugLogMsg(str);
|
||||
for (ii = 0; ii < HASH_TABLE_MAX_COLLISIONS; ii++) {
|
||||
sprintf(str, " %d", atable->htable.counts[ii]);
|
||||
CPPDebugLogMsg(str);
|
||||
ShPpDebugLogMsg(str);
|
||||
}
|
||||
|
||||
} // PrintAtomTable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue