private void SetUp(OpLoopMerge op, SpirvInstructionTreeBuilder treeBuilder) { MergeBlock = (Label)treeBuilder.GetNode(op.MergeBlock); ContinueTarget = (Label)treeBuilder.GetNode(op.ContinueTarget); LoopControl = op.LoopControl; SetUpDecorations(op, treeBuilder); }
public LoopMerge(Label mergeBlock, Label continueTarget, Spv.LoopControl loopControl, string debugName = null) { this.MergeBlock = mergeBlock; this.ContinueTarget = continueTarget; this.LoopControl = loopControl; DebugName = debugName; }
public override void Parse(WordReader reader, uint wordCount) { var end = reader.Position + wordCount - 1; MergeBlock = Spv.IdRef.Parse(reader, end - reader.Position); ContinueTarget = Spv.IdRef.Parse(reader, end - reader.Position); LoopControl = Spv.LoopControl.Parse(reader, end - reader.Position); }
/// <summary> /// Read instruction operands from the bytecode source. /// </summary> /// <param name="reader">Bytecode source.</param> /// <param name="end">Index of a next word right after this instruction.</param> public override void ParseOperands(WordReader reader, uint end) { MergeBlock = Spv.IdRef.Parse(reader, end - reader.Position); ContinueTarget = Spv.IdRef.Parse(reader, end - reader.Position); LoopControl = Spv.LoopControl.Parse(reader, end - reader.Position); }
public static LoopMerge ThenLoopMerge(this INodeWithNext node, Label mergeBlock, Label continueTarget, Spv.LoopControl loopControl, string debugName = null) { return(node.Then(new LoopMerge(mergeBlock, continueTarget, loopControl, debugName))); }