Vixen
02b45cc4
csharp
public readonly struct SpirvOperand

One operand of a SpirvInstruction.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (6)

  • public SpirvOperandKind Kind
  • public uint Value

    The single word, for ids, enumerants and 32-bit literals.

  • public ulong Wide

    The two words of a 64-bit literal, low word first.

  • public string? Text

    The string, or an enumerant's spelling.

  • public bool IsWide

    True for a literal that occupies two words.

  • public int WordCount

    How many words this operand occupies.

Methods (9)

  • public static SpirvOperand Id(uint id)
  • public static SpirvOperand Literal(uint value)
  • public static SpirvOperand Literal(int value)
  • public static SpirvOperand Literal64(ulong value)

    A 64-bit literal, which SPIR-V spells as two words, low first.

  • public static SpirvOperand String(string value)
  • public static SpirvOperand FloatLiteral(float value)

    A float literal. SPIR-V stores the bit pattern, but the listing keeps the number, because 1065353216 tells a reader nothing about 1.0.

  • public static SpirvOperand DoubleLiteral(double value)
  • public static SpirvOperand Enumerant<T>(T value) where T : struct, Enum
  • public override string ToString()

Used by (4)

  • SpirvEmitterVixen.Raven
  • SpirvInstructionVixen.Raven
  • SpirvModuleVixen.Raven
  • SpirvTypesVixen.Raven