summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/version.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-03-31 11:42:01 -0700
committerIan Romanick <[email protected]>2011-04-05 11:21:01 -0700
commitde579a16298e29358fec08bd7cfe3e505674705a (patch)
treec6876be5e7eda7e592f0be3b3e38dd30e82fca80 /src/mesa/main/version.c
parent0fe34b7bbc9a8e089bbb4d0fe401b09095a571eb (diff)
mesa: Include GIT SHA1 in GL version string
Reviewed-by: Corbin Simpson <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Tested-by: Sedat Dilek <[email protected]>
Diffstat (limited to 'src/mesa/main/version.c')
-rw-r--r--src/mesa/main/version.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index c7a0d69a4f0..80fa0c244eb 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -25,6 +25,7 @@
#include "imports.h"
#include "mtypes.h"
#include "version.h"
+#include "git_sha1.h"
@@ -185,7 +186,11 @@ compute_version(struct gl_context *ctx)
ctx->VersionString = (char *) malloc(max);
if (ctx->VersionString) {
_mesa_snprintf(ctx->VersionString, max,
- "%u.%u Mesa " MESA_VERSION_STRING,
+ "%u.%u Mesa " MESA_VERSION_STRING
+#ifdef MESA_GIT_SHA1
+ " (" MESA_GIT_SHA1 ")"
+#endif
+ ,
ctx->VersionMajor, ctx->VersionMinor);
}
}