Enumeration Capabilities

Enum describing the different hardware capabilities we can check for.

Constructors

  • Parameters

    • do_not_: undefined
    • construct_: undefined
    • this_: undefined
    • type_: undefined

    Returns Capabilities

Values

ByteCodeCaching: EnumValue<Capabilities, number>

GPU programs are allowed to cache their bytecode for faster compilation.

ComputeProgram: EnumValue<Capabilities, number>

Supports GPU compute programs.

CubemapArray: EnumValue<Capabilities, number>

True if cube map arrays are supported.

DepthStencilReadBack: EnumValue<Capabilities, number>

True if read backs from depth stencil texture formats is supported.

Float32Filtering: EnumValue<Capabilities, number>

32-bit float formats can be sampled using linear filtering.

GeometryProgram: EnumValue<Capabilities, number>

Supports GPU geometry programs.

IndirectFirstInstance: EnumValue<Capabilities, number>

True if the first instance parameter is supported for indirect draws.

LoadStore: EnumValue<Capabilities, number>

Supports load-store (unordered access) writes to textures/buffers in GPU programs.

LoadStoreMSAA: EnumValue<Capabilities, number>

Supports load-store (unordered access) writes to textures with multiple samples.

MultiThreadedCommandBuffer: EnumValue<Capabilities, number>

Has native support for command buffers that can be populated from secondary threads.

NullFragmentShader: EnumValue<Capabilities, number>

Fragment shader can be null. In other words vertex shader can be provided alone, i.e. if we only need to write to depth/stencil.

PrimitiveId: EnumValue<Capabilities, number>

True if PrimitiveID built-in is available in the vertex shader.

ReadOnlyDepthStencil: EnumValue<Capabilities, number>

Depth/stencil buffers can be bound as read-only, which means they can both be sampled in the shader, as well as used for depth/stencil test operations.

RenderTargetLayers: EnumValue<Capabilities, number>

Supports rendering to multiple layers of a render texture at once.

ResourceArrays: EnumValue<Capabilities, number>

True if resources such as textures/samplers can be part of an array in the GPU program.

RG11B10FRenderable: EnumValue<Capabilities, number>

True if the texture format RG11B10F supports being used as render target.

SampleIndex: EnumValue<Capabilities, number>

True if SV_SampleIndex semantic is supported in the shader.

ShaderF16: EnumValue<Capabilities, number>

True if native f16/half operations are supported.

StructuredBuffer: EnumValue<Capabilities, number>

True if StructuredBuffer types are supported in shader.

TessellationProgram: EnumValue<Capabilities, number>

Supports GPU tessellation programs.

TextureCompressionASTC: EnumValue<Capabilities, number>

Supports compressed textures in the ASTC format.

TextureCompressionBC: EnumValue<Capabilities, number>

Supports compressed textures in the BC formats.

TextureCompressionETC2: EnumValue<Capabilities, number>

Supports compressed textures in the ETC2 and EAC format.

TextureGather: EnumValue<Capabilities, number>

True if texture gather instructions are supported in the shader.

TextureViews: EnumValue<Capabilities, number>

Supports views that allow a sub-set of a texture to be bound to a GPU program. (i.e. specific mip level or mip range, and/or specific array slice or array slice range)

Methods

  • Takes an array of enum values and combines them as a single enum flag value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    Returns EnumValueTyped<T, number>

    The combined enum value.

  • Type Parameters

    • T

    Parameters

    Returns string

    Compatibility

  • Returns string[]

    Compatibility

  • Parameters

    • index: number

    Returns number

    Compatibility

  • Returns number[]

    Compatibility

  • Gets the name for the enumeration value that matches the specified enumValue.

    Type Parameters

    • T

    Parameters

    Returns string

    The enumeration value or undefined if not found.

  • Gets the enumeration names

    Returns string[]

    The enumeration names.

  • Gets the enumeration value at the specified index.

    Type Parameters

    • T = number

    Parameters

    • index: number

      The index.

    Returns EnumValueTyped<T, number>

    The enumeration value or undefined if not found.

  • Determines if the enum value has the flags set.

    Type Parameters

    Parameters

    Returns boolean

  • Determines if the enum bits were changed from previousValue to currentValue.

    Type Parameters

    Parameters

    Returns boolean

  • Iterates the enumeration names

    Returns Generator<string, any, any>

    The enumeration names.

  • Iterates the enumeration values

    Type Parameters

    • T = any

    Returns Generator<EnumValueTyped<T, number>, any, any>

    The enumeration values.

  • Takes a single enum value and splits it into separated flag values set on the value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    • value: number | BrandedType<number, "enum"> | BrandedType<T, "enum">

      The enum value to have it's value split using bitwise-and operator.

    Returns EnumValueTyped<T, number>[]

    An array of each "bit flag" set in the enum.