Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public LoopMerge(Label mergeBlock, Label continueTarget, Spv.LoopControl loopControl, string debugName = null)
 {
     this.MergeBlock     = mergeBlock;
     this.ContinueTarget = continueTarget;
     this.LoopControl    = loopControl;
     DebugName           = debugName;
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
 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)));
 }