Add and partially implement an interface for doing uniform reflection. It includes an AST traversal to identify live accesses.

It does not yet correctly compute block offsets, give correct GL-API-style type values, or handle arrays.

This is tied to the new -q flag.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23938 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-07 01:06:34 +00:00
parent 8ec55cdcd2
commit 11f9fc7247
15 changed files with 682 additions and 18 deletions

View file

@ -61,6 +61,7 @@ enum TOptions {
EOptionsLinkProgram = 0x020,
EOptionMultiThreaded = 0x040,
EOptionDumpConfig = 0x080,
EOptionDumpReflection = 0x100,
};
//
@ -466,6 +467,9 @@ bool ProcessArguments(int argc, char* argv[])
case 'm':
Options |= EOptionMemoryLeakMode;
break;
case 'q':
Options |= EOptionDumpReflection;
break;
case 'r':
Options |= EOptionRelaxedErrors;
break;
@ -575,6 +579,11 @@ void CompileAndLinkShaders()
puts(program.getInfoDebugLog());
}
if (Options & EOptionDumpReflection) {
program.buildReflection();
program.dumpReflection();
}
// Free everything up, program has to go before the shaders
// because it might have merged stuff from the shaders, and
// the stuff from the shaders has to have its destructors called
@ -771,6 +780,7 @@ void usage()
"-d: delay exit\n"
"-l: link validation of all input files\n"
"-m: memory leak mode\n"
"-q: dump reflection query database\n"
"-r: relaxed semantic error-checking mode\n"
"-s: silent mode\n"
"-t: multi-threaded mode\n");