summaryrefslogtreecommitdiff
path: root/source/slang-record-replay/record/slang-module.cpp
diff options
context:
space:
mode:
authorcheneym2 <acheney@nvidia.com>2024-08-15 12:36:41 -0400
committerGitHub <noreply@github.com>2024-08-15 12:36:41 -0400
commit27b2229baa635f4cd6316d987a05ae8979ceab68 (patch)
tree1d25f4c1225e8f0782c0bdf2d082ff859ffe178d /source/slang-record-replay/record/slang-module.cpp
parent99673d783761d954e7e8333110d104144ae1d51a (diff)
Make precompileForTargets work with Slang API (#4845)
* Make precompileForTargets work with Slang API precompileForTargets, renamed to precompileForTarget, does not need an EndToEndCompileRequest and some objects created from it are not necessary either. Take only a target enum and a diagnostic blob as input and handle everything else internally, such as creating the TargetReq with chosen profile. Fixes #4790 * Update slang-module.cpp * Update slang-module.cpp
Diffstat (limited to 'source/slang-record-replay/record/slang-module.cpp')
-rw-r--r--source/slang-record-replay/record/slang-module.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang-record-replay/record/slang-module.cpp b/source/slang-record-replay/record/slang-module.cpp
index b59aaa18b..42dcd9eea 100644
--- a/source/slang-record-replay/record/slang-module.cpp
+++ b/source/slang-record-replay/record/slang-module.cpp
@@ -213,6 +213,17 @@ namespace SlangRecord
return res;
}
+ SLANG_NO_THROW SlangResult ModuleRecorder::precompileForTarget(
+ SlangCompileTarget target,
+ ISlangBlob** outDiagnostics)
+ {
+ // TODO: We should record this call
+ // https://github.com/shader-slang/slang/issues/4853
+ slangRecordLog(LogLevel::Verbose, "%s\n", __PRETTY_FUNCTION__);
+ SlangResult res = m_actualModule->precompileForTarget(target, outDiagnostics);
+ return res;
+ }
+
SLANG_NO_THROW slang::ISession* ModuleRecorder::getSession()
{
slangRecordLog(LogLevel::Verbose, "%s\n", __PRETTY_FUNCTION__);