From 21bbebb19dfdbbee107b9fd9830e18d5fb6a573a Mon Sep 17 00:00:00 2001 From: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:29:56 -0400 Subject: 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 --- source/slang/slang-emit.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang-emit.cpp') 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& 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)); -- cgit v1.2.3