Hierarchy

  • WebGpuFlags

Properties

device: unknown

Get the device for WebGPU.

When use with TypeScript, the type of this property is GPUDevice defined in "@webgpu/types". Use const device = env.webgpu.device as GPUDevice; in TypeScript to access this property with correct type.

see comments on GpuBufferType for more details about why not use types defined in "@webgpu/types".

profiling?: {
    mode?: "default" | "off";
    ondata?: ((data: WebGpuProfilingDataV1) => void);
}

Set or get the profiling configuration.

Type declaration

  • Optional mode?: "default" | "off"

    Set or get the profiling mode.

    Default Value

    'off'

  • Optional ondata?: ((data: WebGpuProfilingDataV1) => void)
      • (data: WebGpuProfilingDataV1): void
      • Set or get a callback function when a profiling data is received. If not set, the profiling data will be printed to console.

        Parameters

        Returns void

profilingMode?: "default" | "off"

Set or get the profiling mode.

Deprecated

Use env.webgpu.profiling.mode instead. If env.webgpu.profiling.mode is set, this property will be ignored.

validateInputContent?: boolean

Set or get whether validate input content.

Default Value

false

Generated using TypeDoc