EOptionDumpConfig = 0x080,
EOptionDumpReflection = 0x100,
EOptionSuppressWarnings = 0x200,
+ EOptionDumpVersions = 0x400,
};
//
Options |= EOptionMultiThreaded;
#endif
break;
+ case 'v':
+ Options |= EOptionDumpVersions;
+ break;
case 'w':
Options |= EOptionSuppressWarnings;
break;
// keep track of what to free
std::list<glslang::TShader*> shaders;
- //printf("%s\n", glslang::GetEsslVersionString());
- //printf("%s\n", glslang::GetGlslVersionString());
-
EShMessages messages = EShMsgDefault;
SetMessageOptions(messages);
return ESuccess;
}
+ if (Options & EOptionDumpVersions) {
+ printf("ESSL Version: %s\n", glslang::GetEsslVersionString());
+ printf("GLSL Version: %s\n", glslang::GetGlslVersionString());
+ if (Worklist.empty())
+ return ESuccess;
+ }
+
if (Worklist.empty()) {
usage();
return EFailUsage;
//
void usage()
{
- printf("Usage: glslangValidator [ options ] filename\n"
- "Where: filename is a name ending in\n"
- " .conf provides an optional config file that replaces the default configuration\n"
+ printf("Usage: glslangValidator [option]... [file]...\n"
+ "\n"
+ "Where: each 'file' ends in\n"
+ " .conf to provide an optional config file that replaces the default configuration\n"
" (see -c option below for generating a template)\n"
" .vert for a vertex shader\n"
" .tesc for a tessellation control shader\n"
" .tese for a tessellation evaluation shader\n"
" .geom for a geometry shader\n"
" .frag for a fragment shader\n"
- " .comp for a compute shader\n\n"
+ " .comp for a compute shader\n"
+ "\n"
"Compilation warnings and errors will be printed to stdout.\n"
+ "\n"
"To get other information, use one of the following options:\n"
- "-c: configuration dump; use to create default configuration file (redirect to a .conf file)\n"
- "-i: intermediate tree (glslang AST) is printed out\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"
- "-w: suppress warnings (except as required by #extension : warn)\n"
+ "(Each option must be specified separately, but can go anywhere in the command line.)\n"
+ " -c configuration dump; use to create default configuration file (redirect to a .conf file)\n"
+ " -i intermediate tree (glslang AST) is printed out\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"
+ " -v print version strings\n"
+ " -w suppress warnings (except as required by #extension : warn)\n"
);
}
--- /dev/null
+// The file revision.h should be updated to the latest version, somehow, on \r
+// check-in, if glslang has changed.\r
+//\r
+// revision.template is the source for revision.h when using SubWCRev as the\r
+// method of updating revision.h. You don't have to do it this way, the\r
+// requirement is only that revision.h gets updated.\r
+//\r
+// revision.h is under source control so that not all consumers of glslang\r
+// source have to figure out how to create revision.h just to get a build\r
+// going. However, if it is not updated, it can be a version behind.\r
+\r
+#define GLSLANG_REVISION "24303"\r
+#define GLSLANG_DATE "2013/12/03 14:05:07"\r
--- /dev/null
+// The file revision.h should be updated to the latest version, somehow, on \r
+// check-in, if glslang has changed.\r
+//\r
+// revision.template is the source for revision.h when using SubWCRev as the\r
+// method of updating revision.h. You don't have to do it this way, the\r
+// requirement is only that revision.h gets updated.\r
+//\r
+// revision.h is under source control so that not all consumers of glslang\r
+// source have to figure out how to create revision.h just to get a build\r
+// going. However, if it is not updated, it can be a version behind.\r
+\r
+#define GLSLANG_REVISION "$WCREV$"\r
+#define GLSLANG_DATE "$WCDATE$"\r