Vixen
dd8b0a81
csharp
public record class ImageFormat

One storage-image format: how the texels are stored, and what a shader reads them as.

Read the guide page for this →

Fields and properties (4)

  • public string Name

    The GLSL layout qualifier, which is also the string a [Format("…")] carries.

  • public uint SpirvValue

    The matching SPIR-V ImageFormat enumerant. Carried here rather than mapped in the backend for the reason BindingPlan exists: a format's spelling in each target is one decision, and two tables would be two chances to disagree.

  • public SpecialType Component

    What the shader sees. Always a four-lane vector, because imageLoad and OpImageRead both hand back four components whatever the format stores — an r32f image reads as (r, 0, 0, 1). Only the component class is part of the contract, which is why rgba8 (eight bits, normalised) and rgba32f are both Float.

  • public bool RequiresExtendedFormats

    Whether a module naming this format has to declare SPIR-V's StorageImageExtendedFormats, and so whether the device has to have shaderStorageImageExtendedFormats.

Methods (1)

  • public ImageFormat(string Name, uint SpirvValue, SpecialType Component, bool RequiresExtendedFormats = false)

    One storage-image format: how the texels are stored, and what a shader reads them as.

Used by (6)

  • FieldSymbolVixen.Raven
  • ImageFormatsVixen.Raven
  • IrCapabilitiesVixen.Raven
  • SourceFieldSymbolVixen.Raven
  • SpirvTypesVixen.Raven
  • StorageImageTestsVixen.Raven.Tests