示例#1
0
		internal Instruction(SpirVOpcodes spirvOpcode, int opcode, Object[] operands)
		{
			this.spirvOpcode = spirvOpcode;
			this.opcode = opcode;
			this.operands = operands;
		}
 public static Object[] GetOperands(SpirVOpcodes opcode, int[] words)
 {
     Object[] operands = null;
     AbstractOperandInterpreter interpreter;
     if (operandsInterpreter.TryGetValue(opcode, out interpreter))
     {
         return interpreter.Interpret(words);
     }
     else
     {
         operands = Array.ConvertAll<int, Object>(words, x => x);
     }
     return operands;
 }