summaryrefslogtreecommitdiff
path: root/source/slang-record-replay/record
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-10-25 10:14:22 -0700
committerGitHub <noreply@github.com>2024-10-25 10:14:22 -0700
commit4bad669bbc5ec3ff77321f083c59cde87eb10229 (patch)
treebf0abc916692cf34e804469bba400f2b04172472 /source/slang-record-replay/record
parentef40d3044cf75ec3d7b24a43257fa744b45274f9 (diff)
Replace stdlib on Slang API with CoreModule (#5405)
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them. Following functions are renamed: compileStdLib() -> compileCoreModule() loadStdLib() -> loadCoreModule() saveStdLib() -> saveCoreModule() slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule() slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule() hasDeferredStdLib() -> hasDeferredCoreModule() Following command-line arguments are renamed: "-load-stdlib" -> "-load-core-module" "-save-stdlib" -> "-save-core-module" "-save-stdlib-bin-source" -> "-save-core-module-bin-source" "-compile-stdlib" -> "-compile-core-module"
Diffstat (limited to 'source/slang-record-replay/record')
-rw-r--r--source/slang-record-replay/record/slang-global-session.cpp20
-rw-r--r--source/slang-record-replay/record/slang-global-session.h6
2 files changed, 13 insertions, 13 deletions
diff --git a/source/slang-record-replay/record/slang-global-session.cpp b/source/slang-record-replay/record/slang-global-session.cpp
index 012900f5c..06bbed553 100644
--- a/source/slang-record-replay/record/slang-global-session.cpp
+++ b/source/slang-record-replay/record/slang-global-session.cpp
@@ -306,48 +306,48 @@ namespace SlangRecord
return res;
}
- SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder::compileStdLib(slang::CompileStdLibFlags flags)
+ SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder::compileCoreModule(slang::CompileCoreModuleFlags flags)
{
slangRecordLog(LogLevel::Verbose, "%p: %s\n", m_actualGlobalSession.get(), __PRETTY_FUNCTION__);
ParameterRecorder* recorder {};
{
- recorder = m_recordManager->beginMethodRecord(ApiCallId::IGlobalSession_compileStdLib, m_globalSessionHandle);
+ recorder = m_recordManager->beginMethodRecord(ApiCallId::IGlobalSession_compileCoreModule, m_globalSessionHandle);
recorder->recordEnumValue(flags);
m_recordManager->endMethodRecord();
}
- SlangResult res = m_actualGlobalSession->compileStdLib(flags);
+ SlangResult res = m_actualGlobalSession->compileCoreModule(flags);
return res;
}
- SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder::loadStdLib(const void* stdLib, size_t stdLibSizeInBytes)
+ SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder::loadCoreModule(const void* coreModule, size_t coreModuleSizeInBytes)
{
slangRecordLog(LogLevel::Verbose, "%p: %s\n", m_actualGlobalSession.get(), __PRETTY_FUNCTION__);
ParameterRecorder* recorder {};
{
- recorder = m_recordManager->beginMethodRecord(ApiCallId::IGlobalSession_loadStdLib, m_globalSessionHandle);
- recorder->recordPointer(stdLib, false, stdLibSizeInBytes);
+ recorder = m_recordManager->beginMethodRecord(ApiCallId::IGlobalSession_loadCoreModule, m_globalSessionHandle);
+ recorder->recordPointer(coreModule, false, coreModuleSizeInBytes);
m_recordManager->endMethodRecord();
}
- SlangResult res = m_actualGlobalSession->loadStdLib(stdLib, stdLibSizeInBytes);
+ SlangResult res = m_actualGlobalSession->loadCoreModule(coreModule, coreModuleSizeInBytes);
return res;
}
- SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder::saveStdLib(SlangArchiveType archiveType, ISlangBlob** outBlob)
+ SLANG_NO_THROW SlangResult SLANG_MCALL GlobalSessionRecorder::saveCoreModule(SlangArchiveType archiveType, ISlangBlob** outBlob)
{
slangRecordLog(LogLevel::Verbose, "%p: %s\n", m_actualGlobalSession.get(), __PRETTY_FUNCTION__);
ParameterRecorder* recorder {};
{
- recorder = m_recordManager->beginMethodRecord(ApiCallId::IGlobalSession_saveStdLib, m_globalSessionHandle);
+ recorder = m_recordManager->beginMethodRecord(ApiCallId::IGlobalSession_saveCoreModule, m_globalSessionHandle);
recorder->recordEnumValue(archiveType);
recorder = m_recordManager->endMethodRecord();
}
- SlangResult res = m_actualGlobalSession->saveStdLib(archiveType, outBlob);
+ SlangResult res = m_actualGlobalSession->saveCoreModule(archiveType, outBlob);
{
recorder->recordAddress(*outBlob);
diff --git a/source/slang-record-replay/record/slang-global-session.h b/source/slang-record-replay/record/slang-global-session.h
index 25504ff02..284185cb4 100644
--- a/source/slang-record-replay/record/slang-global-session.h
+++ b/source/slang-record-replay/record/slang-global-session.h
@@ -42,9 +42,9 @@ namespace SlangRecord
SLANG_NO_THROW SlangResult SLANG_MCALL checkCompileTargetSupport(SlangCompileTarget target) override;
SLANG_NO_THROW SlangResult SLANG_MCALL checkPassThroughSupport(SlangPassThrough passThrough) override;
- SLANG_NO_THROW SlangResult SLANG_MCALL compileStdLib(slang::CompileStdLibFlags flags) override;
- SLANG_NO_THROW SlangResult SLANG_MCALL loadStdLib(const void* stdLib, size_t stdLibSizeInBytes) override;
- SLANG_NO_THROW SlangResult SLANG_MCALL saveStdLib(SlangArchiveType archiveType, ISlangBlob** outBlob) override;
+ SLANG_NO_THROW SlangResult SLANG_MCALL compileCoreModule(slang::CompileCoreModuleFlags flags) override;
+ SLANG_NO_THROW SlangResult SLANG_MCALL loadCoreModule(const void* coreModule, size_t coreModuleSizeInBytes) override;
+ SLANG_NO_THROW SlangResult SLANG_MCALL saveCoreModule(SlangArchiveType archiveType, ISlangBlob** outBlob) override;
SLANG_NO_THROW SlangCapabilityID SLANG_MCALL findCapability(char const* name) override;