summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.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/slang.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/slang.cpp')
-rw-r--r--source/slang/slang.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 81171fdcc..f08a6fc44 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -3252,10 +3252,10 @@ SlangResult EndToEndCompileRequest::executeActionsInner()
for (auto translationUnit : frontEndReq->translationUnits)
{
- translationUnit->getModule()->precompileForTargets(
- getSink(),
- this,
- targetReq);
+ SlangCompileTarget target = SlangCompileTarget(targetReq->getTarget());
+ translationUnit->getModule()->precompileForTarget(
+ target,
+ nullptr);
}
}
}