public TemplatePass Build() { var templatePassInternal = new TemplatePassInternal() { m_DisplayNameHandle = container.AddString(displayName), m_ReferenceNameHandle = container.AddString(referenceName), }; templatePassInternal.m_PassIdentifierHandle = container.AddPassIdentifier(passIdentifier.SubShaderIndex, passIdentifier.PassIndex); templatePassInternal.m_VertexStageElementListHandle = FixedHandleListInternal.Build(container, vertexStageElements, (e) => BuildStageElement(e)); templatePassInternal.m_FragmentStageElementListHandle = FixedHandleListInternal.Build(container, fragmentStageElements, (e) => BuildStageElement(e)); templatePassInternal.m_TagDescriptorListHandle = FixedHandleListInternal.Build(container, tagDescriptors, (o) => (o.handle)); var returnTypeHandle = container.AddTemplatePassInternal(templatePassInternal); return(new TemplatePass(container, returnTypeHandle)); }
// private internal TemplatePass(ShaderContainer container, FoundryHandle handle) { this.container = container; this.handle = handle; this.templatePass = container?.GetTemplatePass(handle) ?? TemplatePassInternal.Invalid(); }
internal extern FoundryHandle AddTemplatePassInternal(TemplatePassInternal templatePass);