summaryrefslogtreecommitdiff
path: root/slang.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-22 07:14:55 -0800
committerGitHub <noreply@github.com>2024-02-22 07:14:55 -0800
commit8ec5b3e6ef2e7e5c3adaa5accb375676b1c09ff0 (patch)
treef3023dc51c32d74d1b5dd4701f5535c8227fe17e /slang.h
parentc5ac7dee8a47dcb168a6556d2e8cdb8d2fe09a37 (diff)
Add API for querying and reusing precompiled binary modules. (#3614)
Diffstat (limited to 'slang.h')
-rw-r--r--slang.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/slang.h b/slang.h
index 8fad8fbc6..30aa8f2a8 100644
--- a/slang.h
+++ b/slang.h
@@ -947,6 +947,8 @@ extern "C"
DebugInformationFormat, // intValue0: DebugInfoFormat
VulkanBindShiftAll, // intValue0: kind; intValue1: shift
GenerateWholeProgram, // bool
+ UseUpToDateBinaryModule, // bool, when set, will only load
+ // precompiled modules if it is up-to-date with its source.
CountOf,
};
@@ -4633,6 +4635,12 @@ namespace slang
virtual SLANG_NO_THROW SlangInt SLANG_MCALL getLoadedModuleCount() = 0;
virtual SLANG_NO_THROW IModule* SLANG_MCALL getLoadedModule(SlangInt index) = 0;
+
+ /** Checks if a precompiled binary module is up-to-date with the current compiler
+ * option settings and the source file contents.
+ */
+ virtual SLANG_NO_THROW bool SLANG_MCALL isBinaryModuleUpToDate(
+ const char* modulePath, slang::IBlob* binaryModuleBlob) = 0;
};
#define SLANG_UUID_ISession ISession::getTypeGuid()