Vixen
02b45cc4
csharp
public readonly record struct IrArgument

One argument of a call: an SSA value, or a variable passed by reference.

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

Remarks

Exactly one of the two is set. A by-reference argument cannot be a value because there is nothing to hand over — the callee needs the storage itself — and it is deliberately an IrVariable rather than an IrPlace: lowering copies any chained place into a temp first, so by the time a call is built the argument is always a whole variable.

That is not a simplification for its own sake. SPIR-V requires a pointer argument to OpFunctionCall to be a memory object declaration, so an access chain such as d.color could not be passed at all, and a uniform's storage class could never match the parameter's. Narrowing the IR to what both targets can express keeps the backends from each inventing a different way to cope.

Fields and properties (4)

  • public IrValue? Value

    The value, when this argument is passed by value.

  • public IrVariable? Reference

    The variable whose storage is passed, when this argument is by reference.

  • public bool IsByReference
  • public IrType Type

Methods (3)

Used by (9)

  • BodyDecoderVixen.Raven
  • FunctionVerifierVixen.Raven
  • GlslEmitterVixen.Raven
  • InOutTestsVixen.Raven.Tests
  • IrCallInstructionVixen.Raven
  • LibraryIrEncoderVixen.Raven
  • LoweredArgumentsVixen.Raven
  • LowererVixen.Raven
  • SpirvEmitterVixen.Raven