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 = 512

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

ComputeProgram = 32

Supports GPU compute programs.

Float32Filtering = 16384

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

GeometryProgram = 8

Supports GPU geometry programs.

IndirectFirstInstance = 2097152

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

LoadStore = 64

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

LoadStoreMSAA = 128

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

MultiThreadedCommandBuffer = 2048

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

NullFragmentShader = 8192

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 = 65536

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

ReadOnlyDepthStencil = 4096

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 = 1024

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

ResourceArrays = 32768

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

RG11B10FRenderable = 1048576

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

SampleIndex = 262144

True if SV_SampleIndex semantic is supported in the shader.

StructuredBuffer = 131072

True if StructuredBuffer types are supported in shader.

TessellationProgram = 16

Supports GPU tessellation programs.

TextureCompressionASTC = 4

Supports compressed textures in the ASTC format.

TextureCompressionBC = 1

Supports compressed textures in the BC formats.

TextureCompressionETC2 = 2

Supports compressed textures in the ETC2 and EAC format.

TextureGather = 524288

True if texture gather instructions are supported in the shader.

TextureViews = 256

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.