libspirv_to_dxil = both_libraries(
'spirv_to_dxil',
- files(
- 'spirv_to_dxil.c',
- 'spirv_to_dxil.h',
- ),
+ [
+ files(
+ 'spirv_to_dxil.c',
+ 'spirv_to_dxil.h',
+ ),
+ sha1_h,
+ ],
vs_module_defs : 'spirv_to_dxil.def',
dependencies : [idep_nir, idep_libdxil_compiler],
include_directories : [inc_include, inc_src, inc_compiler, inc_gallium],
#include "spirv/nir_spirv.h"
#include "util/blob.h"
+#include "git_sha1.h"
+
bool
spirv_to_dxil(const uint32_t *words, size_t word_count,
struct dxil_spirv_specialization *specializations,
{
free(buffer);
}
+
+uint64_t
+spirv_to_dxil_get_version()
+{
+ const char sha1[] = MESA_GIT_SHA1;
+ const char* dash = strchr(sha1, '-');
+ if (dash) {
+ return strtoull(dash + 1, NULL, 16);
+ }
+ return 0;
+}