CapSupportKind
On this page

CapSupportKind

Type in Backends

How one backend supports one capability. - 'native': supported, with nothing to emit and nothing for the host to turn on. - 'directive': supported, and the emitted source declares it.

import type { CapSupportKind } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

type CapSupportKind = 'native' | 'directive' | 'host-feature' | 'unsupported';

Description

The emitter writes the line.

  • 'host-feature': supported, and the host must activate it before pipeline creation (a WebGPU device feature or a WebGL2 extension). hostFeaturesFor looks it up.
  • 'unsupported': the target has no row, and emit throws UnsupportedFeatureError (SD0030) before writing any source.

A row can be both directive and host-feature; 'directive' wins in that case, because it is the half a reader of the emitted source can see.

See also

Source

src/core/backend.ts, line 394, at commit 26de7be8

Edit this page Report a problem