MCPcopy Create free account
hub / github.com/csyonghe/Spire / DeclareOutput

Method DeclareOutput

Source/SpireCore/HLSLCodeGen.cpp:1177–1188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1175 outputIndex = pOutputIndex;
1176 }
1177 virtual void DeclareOutput(CodeGenContext & ctx, ILStage *) override
1178 {
1179 ctx.GlobalHeader << "struct T" << world->OutputType->TypeName << "\n{\n";
1180
1181 for (auto & field : world->OutputType->Members)
1182 {
1183 codeGen->PrintDef(ctx.GlobalHeader, field.Value.Type.Ptr(), field.Key);
1184 ctx.GlobalHeader << ";\n";
1185 }
1186
1187 ctx.GlobalHeader << "};\n";
1188 }
1189 virtual void ProcessExportInstruction(CodeGenContext & ctx, ExportInstruction * instr) override
1190 {
1191 ctx.Body << AddWorldNameSuffix(instr->ComponentName, world->Name) << "[" << outputIndex << "] = ";

Callers 2

GenerateHullShaderMethod · 0.45

Calls 2

PrintDefMethod · 0.80
PtrMethod · 0.45

Tested by

no test coverage detected