From 9e55f633bcc8ce60500a5591b1b5b1a696ab6ee0 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Wed, 15 Jul 2015 10:03:39 -0600 Subject: [PATCH] Include specification revision as part of the version string. --- SPIRV/GlslangToSpv.cpp | 4 ++-- SPIRV/spirv.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index d916f6e4..7f9214c8 100644 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -2545,9 +2545,9 @@ namespace glslang { void GetSpirvVersion(std::string& version) { - const int bufSize = 10; + const int bufSize = 100; char buf[bufSize]; - snprintf(buf, bufSize, "0.%d", spv::Version); + snprintf(buf, bufSize, "%d, Revision %d", spv::Version, spv::Revision); version = buf; } diff --git a/SPIRV/spirv.h b/SPIRV/spirv.h index dc1e579b..32221337 100644 --- a/SPIRV/spirv.h +++ b/SPIRV/spirv.h @@ -50,6 +50,7 @@ namespace spv { const int MagicNumber = 0x07230203; const int Version = 99; +const int Revision = 30; typedef unsigned int Id; @@ -679,6 +680,7 @@ enum Op { const int SpvMagicNumber = 0x07230203; const int SpvVersion = 99; +const int SpvRevision = 30; typedef unsigned int SpvId;