public static IrOperand Parse(Operand operand) { IrOperand result; switch (operand.OperandType) { case Chunks.Shex.OperandType.ConstantBuffer: result = new IrConstantBufferOperand(0, 0, 0); break; case Chunks.Shex.OperandType.Sampler: result = new IrResourceOperand(IR.IrResourceType.Sampler, 0); break; case Chunks.Shex.OperandType.Resource: result = new IrResourceOperand(IR.IrResourceType.Texture, 0); break; case Chunks.Shex.OperandType.UnorderedAccessView: result = new IrResourceOperand(IR.IrResourceType.UnorderedAccessView, 0); break; default: result = new IrDebugOperand(operand.ToString()); break; } result.DebugText = operand.ToString(); return(result); }
public void WriteOperand(IrResourceOperand operand) { Write($"{operand.ResourceType}{operand.IndexId}[{operand.RangeId}]"); }