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
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index b3a37dc..a3c1faf 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -61,6 +61,7 @@
EOptionsLinkProgram = 0x020,
EOptionMultiThreaded = 0x040,
EOptionDumpConfig = 0x080,
+ EOptionDumpReflection = 0x100,
};
//
@@ -466,6 +467,9 @@
case 'm':
Options |= EOptionMemoryLeakMode;
break;
+ case 'q':
+ Options |= EOptionDumpReflection;
+ break;
case 'r':
Options |= EOptionRelaxedErrors;
break;
@@ -575,6 +579,11 @@
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 @@
"-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");