Commit 2813fc0e authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund
Browse files

microsoft/clc: Add a sha-based version number retrievable via export

This will be used to invalidate the libclc cache.
parent 04a6872c
......@@ -39,6 +39,8 @@
#include "nir_builder.h"
#include "nir_builtin_builder.h"
#include "git_sha1.h"
#include "spirv64-mesa3d-.spv.h"
enum clc_debug_flags {
......@@ -1485,3 +1487,13 @@ void clc_free_dxil_object(struct clc_dxil_object *dxil)
free(dxil->binary.data);
free(dxil);
}
uint64_t clc_compiler_get_version()
{
const char sha1[] = MESA_GIT_SHA1;
const char* dash = strchr(sha1, '-');
if (dash) {
return strtoull(dash + 1, NULL, 16);
}
return 0;
}
......@@ -254,6 +254,8 @@ struct clc_work_properties_data {
unsigned group_id_offset_z;
};
uint64_t clc_compiler_get_version();
#ifdef __cplusplus
}
#endif
......
......@@ -10,3 +10,4 @@ EXPORTS
clc_free_object
clc_to_dxil
clc_free_dxil_object
clc_compiler_get_version
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