From 115920406ebd747e02e1e6a8e4595f7d88eef0d9 Mon Sep 17 00:00:00 2001 From: Dietrich Geisler Date: Mon, 20 Jul 2020 14:53:23 -0400 Subject: Multiple Entry Point Backend (#1437) * Multiple Entry Point Backend This PR introduces changes to the IR linking, emitting, and options for multiple entry points. Specifically, this PR updates several locations to support a (potentially empty) list of entry points, adding list infrastructure and looping over entry points as appropriate. * Formatting change * Updated unknown target case to not require an entry point * Formatting and list consts updates Co-authored-by: Tim Foley --- source/slang/slang-emit-spirv.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-emit-spirv.cpp') diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 0ca523ecf..915d963c0 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -1115,19 +1115,21 @@ struct SPIRVEmitContext SlangResult emitSPIRVFromIR( BackEndCompileRequest* compileRequest, IRModule* irModule, - IRFunc* irEntryPoint, + const List& irEntryPoints, List& spirvOut) { SLANG_UNUSED(compileRequest); SLANG_UNUSED(irModule); - SLANG_UNUSED(irEntryPoint); spirvOut.clear(); SPIRVEmitContext context; context.m_irModule = irModule; context.emitFrontMatter(); - context.ensureInst(irEntryPoint); + for (auto irEntryPoint : irEntryPoints) + { + context.ensureInst(irEntryPoint); + } context.emitPhysicalLayout(); spirvOut.addRange( -- cgit v1.2.3