Vixen
02b45cc4
csharp
public static class ImageFormats

The storage-image formats Raven admits.

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

Remarks

A format is required on a storage image rather than optional, and that is the decision worth recording. GLSL needs the layout qualifier on any image that is read, and SPIR-V needs a known ImageFormat or the module has to declare StorageImageReadWithoutFormat — a capability not every device offers. Requiring it means the same declaration compiles everywhere and the host knows exactly what to create the view as.

A subset rather than all forty: these are the ones a post-process or a VFX dispatch actually writes, and every one of them is in Vulkan's list of formats that must support storage. Adding one is a line here and nothing else.

Fields and properties (1)

  • public static string Names

    The recognised format names, in the order a diagnostic should list them.

Methods (2)

  • public static ImageFormat? Lookup(string? name)

    The format a [Format("…")] string names, or null.

  • public static PrimitiveTypeSymbol ElementType(ImageFormat format)

    The element type a format's images are read and written as: the four-lane vector of its component class.

Used by (3)

  • SourceFieldSymbolVixen.Raven
  • SourceNamedTypeSymbolVixen.Raven
  • SpirvTypesVixen.Raven