public override void SetUpDecorations(Instruction op, SpirvInstructionTreeBuilder treeBuilder) { DebugName = treeBuilder.GetDebugName(op); foreach (var instruction in treeBuilder.GetDecorations(op)) { switch (instruction.OpCode) { case Op.OpDecorate: SetUpDecoration(((OpDecorate)instruction).Decoration, treeBuilder); break; case Op.OpMemberDecorate: var opMemberDecorate = (OpMemberDecorate)instruction; SetUpMemberDecoration(opMemberDecorate.Member, opMemberDecorate.Decoration, treeBuilder); break; case Op.OpMemberName: var opMemberName = ((OpMemberName)instruction); Fields[(int)opMemberName.Member].Name = opMemberName.Name; break; default: throw new NotImplementedException("Decoration instruction " + instruction.OpCode + " not yet implemented by " + this.GetType().Name + " class."); } } }