Vixen
02b45cc4
csharp
public enum IrIntrinsic

A built-in operation, resolved from an overload of the intrinsic library to a single opcode. Backends map these to their own spelling (mix/lerp, fract/frac) rather than matching on names.

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

Fields and properties (56)

  • Abs
  • Sign
  • Floor
  • Ceil
  • Round
  • Truncate
  • Fract
  • Saturate
  • Sqrt
  • InverseSqrt
  • Exp
  • Exp2
  • Log
  • Log2
  • Sin
  • Cos
  • Tan
  • Asin
  • Acos
  • Atan
  • Atan2
  • Radians
  • Degrees
  • DdX
  • DdY
  • Min
  • Max
  • Pow
  • Mod
  • Step
  • Clamp
  • Lerp
  • SmoothStep
  • Length
  • Distance
  • Dot
  • Cross
  • Normalize
  • Reflect
  • Refract
  • Transpose
  • All
  • Any
  • SampleTexture

    Sample a texture through a sampler, at the level of detail the derivatives imply.

  • SampleTextureLevel

    Sample a texture through a sampler at a stated level of detail. Separate from SampleTexture rather than an optional operand, because the two are different instructions in both targets and only this one is legal outside a fragment stage.

  • SampleTextureGrad

    Sample a texture through a sampler at a level of detail the caller's own gradients imply.

  • LoadTexture

    Fetch a texel by integer coordinate.

  • TextureSize

    The size of one mip level of a texture, in texels.

  • LoadImage

    Read one texel of a storage image. No sampler and no filtering.

  • StoreImage

    Write one texel of a storage image. The only intrinsic that returns nothing.

  • ImageSize

    The size of a storage image, which has exactly one level.

  • BitCast

    The same bits read as another type of the same width — asfloat and friends. One opcode rather than one per pair: the instruction carries both types already.

  • ArrayLength

    Number of elements in an array.

  • ControlBarrier

    Waits until every invocation of the workgroup has reached this point, and until every write to workgroup storage made before it is visible to all of them.

  • MemoryBarrierShared

    Orders this invocation's writes to workgroup storage against its later reads, without waiting for anybody.

  • TraceRayQuery

    Runs one whole ray query against an acceleration structure: scene.Trace(origin, tmin, direction, tmax). Arguments are [structure, origin, tmin, direction, tmax] — the receiver first, like every member intrinsic.

Used by (10)

  • BitCastTestsVixen.Raven.Tests
  • CompiledLibraryTestsVixen.Raven.Tests
  • GlslEmitterVixen.Raven
  • GlslIntrinsicsVixen.Raven
  • IrCapabilitiesVixen.Raven
  • IrIntrinsicInstructionVixen.Raven
  • LibraryIrIntrinsicVixen.Raven
  • LowererVixen.Raven
  • SpirvEmitterVixen.Raven
  • SpirvIntrinsicsVixen.Raven