summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2024-06-10 16:29:56 -0400
committerGitHub <noreply@github.com>2024-06-10 13:29:56 -0700
commit21bbebb19dfdbbee107b9fd9830e18d5fb6a573a (patch)
tree3792cb476b724f465c9b64b03787965b33b562f4 /source/slang/slang-emit.cpp
parent72016f9201e4d7820f62e7ef78cee98ed1fc4da0 (diff)
Address glslang ordering requirments for 'derivative_group_*NV' (#4323)
* Address glslang ordering requirments for 'derivative_group_*NV' fixes: #4305 The solution is to emit some `layout`s after a module source is emitted. Added to slangs gfx backend code to enable the compute shader derivative extension for testing purposes. * address review * enable removed test --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index da348fa64..6d0ab1daa 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -1587,6 +1587,10 @@ SlangResult CodeGenContext::emitEntryPointsSourceFromIR(ComPtr<IArtifact>& outAr
// Append the modules output code
finalResult.append(code);
+ // Append all content that should be at the end of a module
+ sourceEmitter->emitPostModule();
+ finalResult.append(sourceWriter.getContentAndClear());
+
// Write out the result
auto artifact = ArtifactUtil::createArtifactForCompileTarget(asExternal(target));