summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-10-08 11:50:43 -0400
committerGitHub <noreply@github.com>2019-10-08 11:50:43 -0400
commitc61d529d9aec30dd80e0e915cfad01d42be7e153 (patch)
tree6b7d8ac25df9469fa9a2816f8756b10a66019891 /source/slang/slang-emit-cpp.cpp
parentcae56127251b4766f686c2ec6d4672da3ded160f (diff)
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.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
-rw-r--r--source/slang/slang-emit-cpp.cpp14
1 files changed, 8 insertions, 6 deletions
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<IREntryPointDecoration>();
+ SLANG_ASSERT(entryPointDecl);
// Emit the actual function
- emitEntryPointAttributes(func, entryPointLayout);
+ emitEntryPointAttributes(func, entryPointDecl);
emitType(resultType, funcName);
m_writer->emit("(");