From c61d529d9aec30dd80e0e915cfad01d42be7e153 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 8 Oct 2019 11:50:43 -0400 Subject: Remove EntryPointLayout* use in emit logic. (#1071) * Split out EntryPointParamDecoration. * Add profile to EntryPointDecoration. * WIP for GS handling for GLSL. * WIP for StreamOut GLSL * Fixed GLSL geometry output. * Clean up - remove unneeded/commented out code from the entry point change. * Use Op nums to identify GeometryTypeDecorations (as opposed to contained enum). * Remove setSampleRateFlag & doSampleRateInputCheck * Remove EntryPointLayout from emit. * Change to force CI. --- source/slang/slang-emit-cpp.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-emit-cpp.cpp') diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 3727bf45e..916444d3e 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -1905,12 +1905,12 @@ void CPPSourceEmitter::emitParameterGroupImpl(IRGlobalParam* varDecl, IRUniformP } } -void CPPSourceEmitter::emitEntryPointAttributesImpl(IRFunc* irFunc, EntryPointLayout* entryPointLayout) +void CPPSourceEmitter::emitEntryPointAttributesImpl(IRFunc* irFunc, IREntryPointDecoration* entryPointDecor) { - SLANG_UNUSED(irFunc); + SLANG_UNUSED(entryPointDecor); - auto profile = m_effectiveProfile; - auto stage = entryPointLayout->profile.GetStage(); + auto profile = m_effectiveProfile; + auto stage = profile.GetStage(); switch (stage) { @@ -2450,10 +2450,12 @@ struct GlobalParamInfo void CPPSourceEmitter::_emitEntryPointDefinitionStart(IRFunc* func, IRGlobalParam* entryPointGlobalParams, const String& funcName, const UnownedStringSlice& varyingTypeName) { auto resultType = func->getResultType(); - auto entryPointLayout = asEntryPoint(func); + + auto entryPointDecl = func->findDecoration(); + SLANG_ASSERT(entryPointDecl); // Emit the actual function - emitEntryPointAttributes(func, entryPointLayout); + emitEntryPointAttributes(func, entryPointDecl); emitType(resultType, funcName); m_writer->emit("("); -- cgit v1.2.3