Commit a372a3ed by John Kessenich

Versioning: Update some version strings. Still need better overall version.

parent 9f0b6fa4
...@@ -78,11 +78,6 @@ using namespace spvtools; ...@@ -78,11 +78,6 @@ using namespace spvtools;
namespace { namespace {
// For low-order part of the generator's magic number. Bump up
// when there is a change in the style (e.g., if SSA form changes,
// or a different instruction sequence to do something gets used).
const int GeneratorVersion = 2;
namespace { namespace {
class SpecConstantOpModeGuard { class SpecConstantOpModeGuard {
public: public:
...@@ -885,7 +880,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls ...@@ -885,7 +880,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
options(options), options(options),
shaderEntry(nullptr), currentFunction(nullptr), shaderEntry(nullptr), currentFunction(nullptr),
sequenceDepth(0), logger(buildLogger), sequenceDepth(0), logger(buildLogger),
builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion, logger), builder((glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger),
inEntryPoint(false), entryPointTerminated(false), linkageOnly(false), inEntryPoint(false), entryPointTerminated(false), linkageOnly(false),
glslangIntermediate(glslangIntermediate) glslangIntermediate(glslangIntermediate)
{ {
...@@ -5959,6 +5954,14 @@ void GetSpirvVersion(std::string& version) ...@@ -5959,6 +5954,14 @@ void GetSpirvVersion(std::string& version)
version = buf; version = buf;
} }
// For low-order part of the generator's magic number. Bump up
// when there is a change in the style (e.g., if SSA form changes,
// or a different instruction sequence to do something gets used).
int GetSpirvGeneratorVersion()
{
return 2;
}
// Write SPIR-V out to a binary file // Write SPIR-V out to a binary file
void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName) void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
{ {
......
...@@ -56,6 +56,7 @@ struct SpvOptions { ...@@ -56,6 +56,7 @@ struct SpvOptions {
}; };
void GetSpirvVersion(std::string&); void GetSpirvVersion(std::string&);
int GetSpirvGeneratorVersion();
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv, void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
SpvOptions* options = nullptr); SpvOptions* options = nullptr);
void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv, void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
......
...@@ -1049,6 +1049,7 @@ int C_DECL main(int argc, char* argv[]) ...@@ -1049,6 +1049,7 @@ int C_DECL main(int argc, char* argv[])
printf("SPIR-V Version %s\n", spirvVersion.c_str()); printf("SPIR-V Version %s\n", spirvVersion.c_str());
printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision); printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision);
printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId()); printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId());
printf("SPIR-V Generator Version %d\n", glslang::GetSpirvGeneratorVersion());
printf("GL_KHR_vulkan_glsl version %d\n", 100); printf("GL_KHR_vulkan_glsl version %d\n", 100);
printf("ARB_GL_gl_spirv version %d\n", 100); printf("ARB_GL_gl_spirv version %d\n", 100);
if (workList.empty()) if (workList.empty())
......
...@@ -1572,12 +1572,12 @@ namespace glslang { ...@@ -1572,12 +1572,12 @@ namespace glslang {
const char* GetEsslVersionString() const char* GetEsslVersionString()
{ {
return "OpenGL ES GLSL 3.00 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE; return "OpenGL ES GLSL 3.20 glslang Khronos." GLSLANG_REVISION " " GLSLANG_DATE;
} }
const char* GetGlslVersionString() const char* GetGlslVersionString()
{ {
return "4.20 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE; return "4.60 glslang Khronos." GLSLANG_REVISION " " GLSLANG_DATE;
} }
int GetKhronosToolId() int GetKhronosToolId()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment