Version reporting: Restart active use of revision.h, now based on a git tag.
The new make-revision script regenerates glslang/Include/revision.h,
used as it always has been, but made with a git-tag version and the
the number of commits on master.
I have a pre-commit hook that will automatically do this on master,
likely often enough to work in practice, without needing pull requests
to include it.
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index b88d8ad..2a740ed 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -39,6 +39,7 @@
#include "Worklist.h"
#include "./../glslang/Include/ShHandle.h"
+#include "./../glslang/Include/revision.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../SPIRV/GlslangToSpv.h"
#include "../SPIRV/GLSL450Lib.h"
@@ -782,12 +783,13 @@
return ESuccess;
}
- if (Options & EOptionDumpVersions) {
+ if (Options & EOptionDumpVersions) {
+ printf("Glslang Version: %s %s\n", GLSLANG_REVISION, GLSLANG_DATE);
printf("ESSL Version: %s\n", glslang::GetEsslVersionString());
printf("GLSL Version: %s\n", glslang::GetGlslVersionString());
std::string spirvVersion;
glslang::GetSpirvVersion(spirvVersion);
- printf("SPIR-V Version %s\n", spirvVersion.c_str()); // TODO: move to consume source-generated data
+ printf("SPIR-V Version %s\n", spirvVersion.c_str());
if (Worklist.empty())
return ESuccess;
}